Connecting Tech Pros Worldwide Help | Site Map

about remote mysql

Newbie
 
Join Date: Jul 2009
Posts: 8
#1: Jul 26 '09
i connect mysql remotely. it is very slow
i google search, some web sites said, put
skip-name-resolve
skip-host-cache
i have done that...however, it is still very slow
i read some web sites, someone said.. change the host file in mysql, however, i cannot find the host file in my mysql directory,
the version i installed is the version for windows.

Can anyone give me some ideas
Canabeez's Avatar
Member
 
Join Date: Jul 2009
Location: Israel
Posts: 85
#2: Jul 26 '09

re: about remote mysql


Can you provide more information, is your mysql server stationed on a host? What software are you using to connect it?
Newbie
 
Join Date: Jul 2009
Posts: 8
#3: Jul 26 '09

re: about remote mysql


thanks very much.

1) mysql_connect('localhost','root','123') ->both mysql and php in the same machines
2) mysql_connect('222.222.222.22','root','123') ->both mysql and php in the same machines

the above 2 cases, it works well

3) mysql_connect('333.333.333.33','root','123') ->mysql and php in different machines

the speed become very slow

The same case also happen in my python/tkinter programs as well....

The speed is 10 times lower than normal.. always exceed the time limit

i am testing it in the windows version mysql....

Can anyone give me some clue ???
Canabeez's Avatar
Member
 
Join Date: Jul 2009
Location: Israel
Posts: 85
#4: Jul 26 '09

re: about remote mysql


How far are the machines, is it the same network? Or the same country...? What I can see from now, it's not mysql, but network problem.
Newbie
 
Join Date: Jul 2009
Posts: 8
#5: Jul 26 '09

re: about remote mysql


Dear Canabee.
Thanks..very much...i am not familiar with networking, what i found is if i ping the remote server, it returns the speed of average 180ms. if i ping my localhost, it returns 0ms. Does it means that connecting remote mysql, we needs 180 times than local mysql....

i am totally confused..
Canabeez's Avatar
Member
 
Join Date: Jul 2009
Location: Israel
Posts: 85
#6: Jul 26 '09

re: about remote mysql


Theoretically, yes. 180 ping is usually on really really low speed connections or if you're in Europe and your mySQL server is in the States, or the opposite...
Newbie
 
Join Date: Jul 2009
Posts: 8
#7: Jul 26 '09

re: about remote mysql


dear canabeez
thanks very much
Reply