DB problem after transfering accounts to new server

radeonpower

Well-Known Member
Jul 23, 2009
141
4
68
Iceland
cPanel Access Level
Root Administrator
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.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,740
301
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
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.
 
  • Like
Reactions: radeonpower

radeonpower

Well-Known Member
Jul 23, 2009
141
4
68
Iceland
cPanel Access Level
Root Administrator
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.
 

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
196
37
103
USA
cPanel Access Level
Root Administrator
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