Jump to content

Transfered a website to new host - DB connect error 1045


adinuno
 Share

Recommended Posts

Hi there,

I have recently transferred my Processwire to a different host. I have created a database and imported to the new host server and have transferred all the files Processwire. I have also created a database user and updated the config.php file with the necessary information and I am getting the following error in debug mode:
 

Fatal error: Exception: DB connect error 1045 - Access denied for user 'admin'@'192.249.113.81' (using password: YES) (in /home/admin/public_html/wire/core/ProcessWire.php line 96) #0 /home/admin/public_html/wire/core/ProcessWire.php(45): ProcessWire->load(Object(Config)) #1 /home/admin/public_html/index.php(183): ProcessWire->__construct(Object(Config)) #2 {main} in/home/admin/public_html/index.php on line 214
This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.

Any clues of what is happening? Can anyone please help me?

 

Thanks

Link to comment
Share on other sites

Check if your new database is really consistent with your old one.

You should migrate database tables only.

Write permissions are ok ? Make sure that the files/folders in the assets folder are writable.

What about your root .htaccess file, rewrite base, etc. ?

You can find classical migration problems solved many times before in the forum.

https://processwire.com/talk/topic/4199-exporting-importing-database-error-access-denied-for-user-user-namelocalhost-to-database-database-name/

https://processwire.com/talk/topic/3113-how-to-transfer-processwire-from-local-installation-to-online/

https://processwire.com/talk/topic/8792-403-forbidden-when-saving-homepage/

https://processwire.com/talk/topic/1211-impossible-to-login-after-migration/

  • Like 1
Link to comment
Share on other sites

Also, make sure the host part for the user matches the web server IP (or is "%" as a wildcard).

select user, host from mysql.user;

lists all configured users and their allowed source hosts.

If that matches, check your user's permissions.

show grants for 'admin'@'192.249.113.81';

(or 'admin'@'%' if you specified a wildcard, whatever the user table showed). Check the exact database naming and, if all that fails, also reset the password.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...