DB problem after transfering accounts to new server
Hi all, I have a strange problem after I moved accounts from old server to new one. This is the first time I encounter this problem, I have done lots of transfers over the years without any problems.
For example there is a Wordpress page and in the wp-config.php the DB_HOST is "localhost" which worked fine on the old server. It's not working on the new server until I put the public IP instead of "localhost". How can I fix this?
Thank you.
-
Check you /etc/hosts and make sure localhost is set to resolve to 127.0.0.1. look at the old server file for comparison. 0 -
I'd also check to make sure MySQL is binding to 0.0.0.0 and not just the public IP. 0 -
Thanks for the suggestions. I did check /etc/hosts and it is the same as on the old server. The SQL server is also running with bind = 0.0.0.0 but no luck yet. :) 0 -
Try connecting as a user on the command line mysql -u user -p -h localhost And see what error you get. 0 -
Also you didn't set up a remote MySQL server did you? 0 -
No it's a local server. Connecting locally works fine. Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 15 Server version: 10.3.23-MariaDB-log MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 0 -
That's using a Wordpress user? That doesn't make sense... 0 -
I know, it's very strange. Never had this problem before. :p 0 -
Hello @radeonpower When you say that the Wordpress page is not working, can you clarify what you mean by that? Are you receiving a specific error message when you attempt to access the site? Are there any errors logged to the Wordpress site's error log? Best regards 0
Please sign in to leave a comment.
Comments
9 comments