Jump to content

somethings going horribly wrong!


MSUK1

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.