MSUK1 Posted December 1, 2010 Share Posted December 1, 2010 okay, so my site is hosted on one server. we are moving the server content onto another server but keeping the database on the old server [to try releive server load of origonal server] OLD Server IP: 174.37.165.192 NEW Server IP: 94.236.52.170 --------------------------- the new server hosts a site already, we are adding this site onto it, however when i try to connect to the old server for the database, here is the error i get: Access denied for user 'staceyxs_System'@'mattress-sales.co.uk' (using password: YES) it is putting mattress-sales.co.uk as the server im trying to access however in the code i am using the IP of my old server. so i thought i'd change the host to "efsas" [random lettering] and i get the error "efsas is not a valid host" which is fine! so it means it is checking what i enter in the $host variable.. here is my code: define("DB_SERVER", "174.37.165.192"); define("DB_USER", "db_user"); define("DB_PASS", "pass"); define("DB_NAME", "db_table"); have removed some values for protection.. anyway, if you visit 94.236.52.170 you will see the error.. and if you visit : 174.37.165.192 you will see what it should look like. Quote Link to comment Share on other sites More sharing options...
mikosiko Posted December 2, 2010 Share Posted December 2, 2010 check in your OLD server the mysql cnf file (normally under /etc/mysql if linux server) if it has the directive skip-networking active... if so you can comment it .... restart mysql and try Quote Link to comment Share on other sites More sharing options...
MSUK1 Posted December 2, 2010 Author Share Posted December 2, 2010 linux server running cpanel no file found Quote Link to comment Share on other sites More sharing options...
mikosiko Posted December 2, 2010 Share Posted December 2, 2010 what is the name of the file that you searched for? Quote Link to comment Share on other sites More sharing options...
MSUK1 Posted December 2, 2010 Author Share Posted December 2, 2010 Mysql I don't even have a folder called mysql It seems to be a problem with server 2 new one as we ran a ssh test on that remote SQL and it worked Quote Link to comment Share on other sites More sharing options...
mikosiko Posted December 2, 2010 Share Posted December 2, 2010 try to find the mysql config file in your old server and look at it... I will start from there... error seems to point to that server is not accepting remote connections Quote Link to comment Share on other sites More sharing options...
MSUK1 Posted December 2, 2010 Author Share Posted December 2, 2010 Hm, it's strange because the new server changes my php host variable to matters-sales That domain is on the new server But in the php i use THE ip of the old machine :/ Thata why I'm confused Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 2, 2010 Share Posted December 2, 2010 I don't see anywhere in this thread where you have configured the old database server to accept a remote connection from the IP address of the new web server? That would be your first step. And you do realize that connecting to the old database server remotely over the Internet will be several times slower than when the database server and web server were on the same hardware, in the same rack, or even in the same data center. Quote Link to comment Share on other sites More sharing options...
MSUK1 Posted December 2, 2010 Author Share Posted December 2, 2010 We know it may be slower but would like to traffic the requests we get until my new dedi server is up Our site receives 20k hits daily and we recently lost a good server so this is just for this weekend when our hits expect to double as it comes to a close for the reality tv show my sisters on so this is just to traffic the server load On the old server we used cpanel to allow remotesql for the new servers IP Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 2, 2010 Share Posted December 2, 2010 In doing a little basic research on this (search for mysql dns lookup) - http://dev.mysql.com/doc/refman/5.0/en/dns.html you either need to disable DNS host name lookups on the old mysql server or you need to enter the mattress-sales.co.uk domain name instead of the IP address of new server (client) that you want the old mysql server to accept a connection from. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.