Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Slow Database Connections Between 2 Different Servers


I have 2 dedicated servers with different hosting companies.

It is taking about 4 seconds to get a database connection, either by using JDBC driver or from the command line.

If I do telnet to port 3306, it is instant.

Any ideas on what might be causing this or where I should be looking?




View Complete Forum Thread with Replies

Related Forum Messages:
Slow Connections
I am using MyODBC-3.51.11-2-win on Win 2003 OS. I am not able to see all of the connections in the list under the System DSN tab. The connections that show allow the ASP pages to run at an expected rate.

However, the ones not showing in the list are running extremely slow. If I attpemt to recreate the connection I am told that the connection already exists and asks if I want to replace the existing connection. Wheter I click yes or no the connections do not show and the pages run slowly. How do I get them to show or resolve the issue. The ASP code is the exact same SQL statements and connection strings as the in previous applications.

View Replies !
SLOW REMOTE CONNECTIONS
well i have read many many threads about mysql being slow on remote connections due a issue called dns look back, and dns round trips ive read many many times the solution its the to add this line to the my.ini skip-name-resolve.

but it mysql seens to ignore it since i still can use dns on the conections and the response times still 5 seconds or moreits not a network speed or latency issues cause once connection its established it works fine.

this its how my.ini on my computer looks like

[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
skip-name-resolve

whats wrong there or what could i be possibly doing wrong.

View Replies !
Design Of Database Servers
Database design is well covered in undergrad CS. But does anyone know of
a textbook that deals with the design of database servers (and probably
touches on databases themselves), and perhaps deals with interpreting SQL inquiries?

The motivation for this is that I wish to write a database server for a
proprietary operating system (it resembles POSIX, but is not completely compliant)
for an embedded processor system that exchanges queries from clients also
employing embedded processors. Stored data is all in one place.
I'm a little familiar with the MySQL source code, but I don't
wish to replicate something that complex. The sort of investment
I'm talking about should involve no more than three man, er, person-months
by an experienced C++ programmer with plenty of experience in systems
and database programming for both Microsoft and Linux platforms.

View Replies !
Sharing A Database Between Two Servers
I have 2 harddrives, one with linux and windows, and the other holds all my php and sql databases. I set up the databases with windows and everything is fine. Now I want to be able to just have the linux version of mysql look at that same database on the second harddrive and work with the database. The error I get is "Can't open file:

'**.ibd' (errno: 1): "** being any of my tables. Is it possible to configure them to work together in anyway? I dont want to manually have to dump the database and then reload it every time i switch between the OSs... any suggestions?

View Replies !
Two MySql Servers, One Database
I have two MySql servers, one in my local PC and one as a testing server in the next room. Using DW 2004 I can use the "put" and "get" to get my PHP files from one PC to the next quicky. How can i do that with the two MySql servers? So if I change the Structure of a table or and data to the Mysql database on my local PC, it will send the changes to the testing server.

View Replies !
Charset Problems Copying Database Between Servers
I am trying to copy a database from one web host to another using the export/import functions in phpmyadmin.

The MySQL connection collation for both servers is utf8_unicode_ci.
The database collation for both databases is latin1_swedish_ci.

One of the problematic fields is "page_title" in the table "wikipage".
The collation of the field is latin1_bin but the data stored is in utf-8 (that is no problem).
In one row in the original database, the page_title field contains the following value: Firefox/Grå_kasse
In the new database, the same value is: Firefox/Grå_kasse

As you see, the value is changed during copy.

I use phpMyAdmin - 2.9.1.1 for both export and import. The charset used for the exported/imported file is utf-8.
I copy from a server running MySQL 5.0.24a to a server running MySQL 4.1.21-log

My guess is, that the problem is during import, not export. That's because in the exported file, the string mentioned above looks like this: Firefox/Grå_kasse

What am I doing wrong?

View Replies !
Comparison Of Open Source Database Servers
We need to compare the open souce Databases- MySQL and PostgerSQL based on features as well as on performance.

If anyone has done such a comparison, please share your knowledge with us.

View Replies !
Database Connections
i have a general question using the mySQL database.
Lets say I have 10 database queries in my application. The 10 queries do not happen one after the other in a short time, so it can be that between one and the next query elapse seconds, or minutes, depending on e.g. user actions of my application.
Well, should I open and close a connection for every query or should I open one connection in the beginning of my apllication, then do the ten queries with the same connection and afterwards close the connection again?
I think both is possible, but what is 'best practice'?
Is it a matter of speed from/to the database

View Replies !
Stop Further Connections To Database
Does anyone know of a way to stop further connections to a database while letting existing ones complete? Does restarting the server allow ALL threads to complete before shutting down?

View Replies !
Multiple Database Connections
I have a simple music script that gets artists from a db and spits them out. On another content box I have the "content", of the artist. It will take songs and spit them out. Sadly, these are on different databases. How can I open 2 databases and get info from both?

View Replies !
Limiting Database Connections
After using Joomla for several years with my site, I decided to make my own CMS because it would be more customizable. All good, until recently. Every couple days or so, I check my site and find there are too many MySQL database connections making it impossible to view any content on the site.

This is a problem. I thought my CMS was lite enough, but I guess not. Each time it grabs content, it goes to the database. Should I use caching to solve this problem? Or what else?

View Replies !
Database Sessions Lead To Clogged Connections
I had a system where when a user logs in, a CURL request is sent to the other http server which creates its own php session with the POST data (lets avoid all the security mumbo jumbo). This worked, but when one session expired on one server, then the other server had no idea of it.

So I switched to putting sessions in my database for a cross-server solution (the two http servers share the same database). This solved the issue of mirrored session data, but then I started to get an excess amount of mysql connections (I'm using persistent connections) and as a result my website crashed. No matter by how much I increased the max_connections, the database server kept on reaching its limit (not a performance limit, but a connection limit).

OK so now I've switched back to PHP sessions, but I made the session directory available to the other http server with NFS. This solution works fine.

View Replies !
Slow Database Retrieval
iwhat would be the cause of our problem? i don't thnk it has someting
to do with the way i run my queries from my applications since i do
not encounter such problems on our old machine..Also i tried to
execute queries from my sqlyog :
ex:
select * from db_town
result: 8902 rows() in 2687 ms
where on the old server it should take only about 421 ms

select * from diagnostics_detail
result: 42499 rows() in 27609 ms
where on the old server it should take only about 4375
ms.

View Replies !
Connect To A Database Is Slow
I can connect to the mysql server really fast. But when I select a database, the server will wait for about 10 seconds before connecting obviously, imagine that kind of wait on a website. loads of users will click off.

View Replies !
MySQL Slow To Connect To Remote Database
I was running a PHP/MySQL web site with the database on the local web server. I needed to move the database off the webserver (located in the firewall DMZ) and onto its own machine (behind the firewall on our private network)

Now when I run my web site it goes really slow. I ran mysql from the command line on the web server and connected through to the database machine behind the firewall using
webserver:/# mysql -h 192.168.1.7 -u www-data -p

After I enter the password, it takes around 5-7s before I see the mysql> prompt.

Is mysql trying to do reverse dns on the IP address and timing out? I added the machine details to /etc/hosts so it would be recognized but no improvement. Or do I have something wrong with my mysql configuration?

View Replies !
"use Database" And Slow Log File
I have an application, which normally looks at two InnoDB databases:

1) db1 with approx 100 tables for usual queries
and
2) db2 with 2 tables for registration of visitors (cake_session).

naturally, queries appear independently and

there are a lot of queries in a slow log file after commands

use db1

and

use db2.

Need the commmand "USE" much time?

How can I reduce this time?

Is it usefull, if I make "USE" only for db1
and access the table cake_session like INSERT INTO db2.cake_session ...?

View Replies !
Two Servers
I run two MySQL servers on Windows with the two services.
I read in the docs that it exists a way to identify the servers in my.cnf by
groups and about a tool from Linux to manage the groups.
How can I start a server on Windows through the my.cnf/my.ini 's groups?


View Replies !
Different Db Servers
db masters,

Can I use databases from different servers ?

I mean, for example, I have two sites :

www.site1.com --- hosted by providerA
www.site2.com --- hosted by providerB


The site2 uses databases from providerA for running queries or updating tables

View Replies !
Join Across Servers
Can you join two tables across different servers in mySQL, or am I
dreaming of Oracle?

View Replies !
Running Two Servers
--=__Part1A441A35.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

I am looking into installing 2 mysql servers on the same windows 2000
PC. From what I have found, it is usually possible to have 2 different
versions on the same machine. (Usually one for testing and the other for
production). However, I am trying to run 2 production servers, one for
personal family info, and the other for business opportunity.
Being that I just started using mysql, is it possible then to have the
same version installed twice, or how do I accomplish my task?

View Replies !
Two Master Servers
I am using two master servers that are synchronized with each other so that if one of them gets disconnected, the other one could take over and no data is lost.
Now my problem is doing backup on the servers. Say I am doing backup on Master 1 and after backup, I will delete the data. So, since Master 2 is synchronized with Master 1, will the deleted data be written back to Master 1?
My batch file is something like this.
echo Executing MYSQL BACKUP
mysqldump -uroot -proot --result-file=%SAVPATH%%FILENAME%".sql" database1
echo Executing MYSQL DELETE
mysql -uroot -proot datalog < "C:Program FilesMySQLMySQL Server 5.0inscript.sql"
Script.sql will call the command "DELETE from table1" for me.

View Replies !
2 Mysql Servers
I have a Mysql server lets call it "Production", but also do lots of development when traveling (offline) on my laptop, where i also have mysql instance installed + php + apache .... both MySql are 5 and same build running on windows.

What would be the best way to "replicate" Mysql from my laptop to the server when I get connected. One way solution (from Laptop to Server) would be great, but both ways (whichever is newer gets replicated would be excellent). thought about replication but i undertood that the master 'version' will always be writen to slave.

We need to consider any kind of changes, table changes, dbs change, users, data, etc...

Hope you can give me a light, it is not a large amount of data, and i would not mind a very manual process, as long i can script it or if it is a few steps only.

View Replies !
Slave Servers
i have do replication with 1 master server to 3 slave servers.
And i want to grant the 3 slave servers only select option for all user;

View Replies !
Load Balancing 2 Web Servers
I am in the process at looking into load balancing 2 web servers.
I will need both servers to have MySQL server installed and then a load balancer to split the traffic to both servers. The servers will be running apache with PHP web sites. Has any one set this up and do you have any notes for me, i.e. what version of MySQL do I need, how should it be setup etc. Do I need to be careful of auto increment keys etc.

View Replies !
Two Servers On Windows And My.cnf/my.ini Groups
I run two MySQL servers on Windows with the two services.
I read in the docs that it exists a way to identify the servers in my.cnf by
groups and about a tool from Linux to manage the groups.
How can I start a server on Windows through the my.cnf/my.ini 's groups?

View Replies !
Multiple Servers On The Same Host
Well i want to run multiple servers on the same host, has somebody a Howto for this?
Code:

View Replies !
MySQL Databases And 2 Servers
We are planning to reprogramm our search machine and website. Since we
have call agents who query the same database as the customers do, we
had the idea of splitting the database to 2 servers.
The call agents can update customer data with our intern webinterface,
which not only concerns tables that are for the call agents, but also
concerns tables of the search machine, holding company data such as
address, search words, etc. Since the customer himself can administer his
own data, as well as the call agent (or media agent), I was thinking
of doing following:

* I have 2 servers. Server 1 is responsible for the search machine and
just serves customers searching for a company or for products. The
MySQL database is there just for querying.
* Server 2 serves call agents, as well customers who want to change
their data, reading and writing.
* Since the search machine should of course show updated data the call
agent or the customer have eventually changed, the data from server 2
must be synchronized with the MySQL databese of server 1. (e.g. at
midnight)

Questions:
-------------
0. Is the above described the right way?
1. What do I have to consider when planning the database structure?
2. How do I synchronize? Can I copy specific tables from one server to
another using cronjobs (crontables)? Since this is absolute newland to
me, how?

Any expert knowledge or experience with MySQL replication or MySQL
clusters? I think replication is just thought for mirroring, or am I
mistaken?

View Replies !
Consolidating MySQL Servers
My organization currently has 2 different MySQL database servers. We
are in the process of moving the databases from Server A to Server B
and have Server B be our primary database server. I've done some
research on the web and believe the best option is to use the
"mysqldump" command to remotely recreate Server A's databases on to
Server B.

Can anyone please advise whether this is the best option? Also, using
the "mysqldump" command, are there any overwrite issues, such as
existing tables on Server B being overwritten by tables with the same
names from Server A. Would these tables be simply overwritten or
would there be any type of warning prompt?

View Replies !
Same Auto_increment Value On Cluster Servers?
Is using an auto_increment field a bad idea if you may have multiple MySQL servers in a clustered config? Basically the diff servers will be auto_incrementing differently? Is there a commonly used alternative for primary keys when clustering is used? I'm thinking about using some kind of hash instead.

View Replies !
Connecting On Remote Servers
I have 2 web servers running. One has MySQL installed and all my pages on that server connect to it fine (using localhost in the connection string). But I cannot connect from my other server, I get the error - Warning: mysql_connect(): Can't connect to MySQL server on '**the server with MySQL**'

I've scoured Google all day and can't figure it out. The bind-address line in my.ini is commented out, skip-networking has been turned off, and the all the users in MySQL are host-independent (they all have the @ sign), so it's not a permissions thing. Other than these issues, what else could be causing a remote connection error?

View Replies !
One (phisical) DB And 2 MySQL Servers
Is it possible, that couple of MySQL servers wcan work simultaniously with one (phisical) DB?
My task is following:
I have to computers and thay both have one (and the same)å SCIS Raid harddisk.
This all together shall be a MySQL Server.
have can MySQL be installed so, that DB will be placed in one pace (SCIS Raid), and MySQL works simultaneously on both computers.
what concerns MySQL Cluster, as much as i've understood it is designed to store one DB in different places - distributed by cluster nodes. It is too much for me, isn't it

View Replies !
Lost Connection :: 2 Servers Over LAN
Ok heres a quick background on the situation. I run a large mysql orinated website, and tried splitting the load between 2 servers together connected via lan. On server 2 im running debian 3.0 testing/unstable with MySQL 4.0.24. When i try to execute a php mysql search script from Server 1 I get this error:

Warning: mysql_pconnect(): Lost connection to MySQL server during query ..............
Connection Error

I have searched googled, and found a possible solution, which turned out did not work. I simply added these 2 lines to my /etc/hosts.allow

/etc/hosts.allow
mysqld : ALL : ALLOW
mysqld-max : ALL : ALLOW

Also I edited /etc/mysql/my.cnf and added wait_timeout 16000

View Replies !
Moving Databases Across Servers
I just found out that my host is running an old version of mysql, and I think that's why alot of the things I've written aren't working. I've got host space at another server with a newer version of MYsql, and I'd like to transfer most of my work over there.
...But I don't want to have to completely rebuild all my databases and their entire contents.Is there some simple way anyone knows to download the tables & contents of a database from one host and then put it back up on another?

View Replies !
Scripts, Databases And Servers
Is it possible to have a script in server1 calling a database located in server2 (both remote servers)?
I made a try but it didn't work.
PHP Code:

 $hostname_owner = "mysql.server.com"; // this is remote
$database_owner = "database";
$username_owner = "owner";
$password_owner = "passw";
$owner = mysql_connect($hostname_owner, $username_owner, $password_owner) or trigger_error(mysql_error(),E_USER_ERROR); 

View Replies !
Join Tables On Other Servers
Is it possible to, for example, join a table in a database on another server in a select?

View Replies !
Several Mysql Servers On 1 Machine
Is it possible to setup 2 mysql servers on a Linux platform?

For example, both are listening on different sockets. They have different processes, working directory, setup directory.

I've seen the my.cnf on my machine but I can't see any socket number.

View Replies !
MySQL And Free Web Servers
can you use MySql on web Servers like
Freewebs.com,Yahoo!geocities, aol home town ans sites like that.

View Replies !
Master Servers Merge
I want to make query to merge table1 from master server A and table2 from master server B (ex: select * from table1, table2) because my site becomes heavy traffic and database gets bigger. It means I need to separate tables and create new database on other master server B. Do you know how to make "merge" from master server A and B?

View Replies !
Mysql On Windows Servers
Will mysql work with microsoft server products? Does it lose any funtionality? Would it be better to use mssql?

View Replies !
Running 2 Msql Servers
I want to run two mysql server on the same win xp machine independent of each other: one on 3306 and one on 3309. How and what files do I have to modify to set the second server port to 3309 permanently.

View Replies !
Replication With Multiple Servers In Mysql ?
I want to establish replication between multiple (currently three) servers.
Updates/inserts/deletes may happen on all of them. The idea I came up with
was to do a "circle"-replication. The problem with this is, that if one
server fails the rest may not get updates (until the server is back,
obviously).

Does anybody have an idea how to establish such a replication in a fail-save
manner ? Code:

View Replies !
Replication With Multiple Servers In Mysql
I want to establish replication between multiple (currently three) servers. Updates/inserts/deletes may happen on all of them. The idea I came up with was to do a "circle"-replication. The problem with this is, that if one server fails the rest may not get updates (until the server is back, obviously).Does anybody have an idea how to establish such a replication in a fail-save manner?

View Replies !
Two MySQL Servers Share Data
Is it possible to have who MySQL servers contact eachother at a certain time intervul and send data to each other?

For example: Mysql A is empty. Mysql B is used for all kinds of things. I want Mysql B to send certain tables to Mysql A every 5-10 minutes.

View Replies !
How To Target 1 Of 2 Servers On The Same Windows Server
With the end of the year came the time to do upgrades on my server. I try to stay back a revision in conservative fashion. So MySQL 4.11 was upgraded to 5.0 then 5.1 on Dec 31st.

We just found out that one of our clients sites can not work with 5.1 so we rolled back to 4.11

But MySQL allows you to run multiple SQL servers without problem on the same server. So 5.1 was reconfigured to run on a different port than default.

Now I have phpMyAdmin with two configurations able to access both DBs.

The question is, How do I target one DB or the other with my scripted pages? Connection string? IIS config based site to site or based on the ext like PHP files will use one port and .ASP files will use another?

View Replies !
Two Tables On Different Servers From Same Data, Yet Different Row Count
Records 106691 Deleted: 0 Skipped: 436 Warnings: 0

Why would it skip these rows? My key has no duplicates (I ran SELECT DISTINCT query on localhost.database.key and it showed 106691). Why would it skip rows on one server and not another?

View Replies !
SELECT From Different Databases/servers Tables
I can't find the exact MySQL instructions to get data from tables located on a different database in the same engine and/or on different databases in different engines. I am working to a migration from Informix. In Informix a table name is defined as:

<tbl_name> (as usual)

or

<db_name>:<tbl_name> (same engine, different db)

or

<db_name>@<server>:<tbl_name>
(different engine, different db)

How can, if possible, replicate this syntax in MySQL ??

View Replies !
Bulk Copy Between Two Mysql Servers
I want to transfer data between two mysql servers running on two between machines and i want to add this option in may application. so can any one tell me throught which commands i can do this.

View Replies !
Installing Multiple MySQL Servers
If you need multiple MySQL servers running, what's the difference between installing MySQL once and running multiple servers (by issuing multiple mysqld commands with their own options), versus actually installing two or more DIFFERENT instances of the same version of MySQL?

What is typically done? What are the advantages/disadvantages of either method?

View Replies !
Setting Up With Runescape Private Servers..
Okay.. So theres these things called runescape private servers where you can connect to someones "world" And They use mysql to keep track of saved games, chars.. etc. How would I set up my sql to do that? Someone on my forum said that you need a mysql manager..

This was exactally what he said:

Get a SQL manager to create a database for your characters table.

View Replies !
Detecting MySQL Servers On LAN's
I want to build a script/app to make an inventory of all computers that run MySQL servers. And if possible return their versions. I would be running this script/app from a Windows system, so I would like to use VBScript or Visual Basic 6.0. This way the people I am working with will be able to understand what I am programming too. Further more it would be nice if I couldn't only detect the Windows machines, but also other systems (mainly Linux). Can this be done? And how?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved