0

I have moved my wordpress from one hosting to other but it gives database error

Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'user'@'localhost' (using password: YES) in /home/########/public_html/fvas/wp-includes/wp-db.php on line 1531

I have change the database name in wp-config.php and user and password too but its always giving this error what should i try?

4
  • is your username just user? Jul 27, 2018 at 11:38
  • nope its related to my domain so excluded @MaulikVora Jul 27, 2018 at 11:59
  • try replacing localhost with ip define('DB_HOST', '127.0.0.1:8889'); Jul 27, 2018 at 12:18
  • @MaulikVora i some how manage to recover the site by premium.wpmudev.org/blog/move-multisite-new-domain this article but site have the issue on some systems it works and for some gives error https/ don't know why its a wordpress multisite Jul 30, 2018 at 7:24

2 Answers 2

0

The credentials for your database are located in the wp-config.php file. Make sure those settings are correct.

In particular, non-ASCII characters may be causing a problem. Or an extra space in any value (especially the password).

Look at the user/pass/dbname in your host also. An extra space at the end of the password in wp-config or on the host, for example, can cause authentication errors.

I'd reset the user/pass via your hosting cPanel, making sure no extra spaces or non-ascii characters in those fields. Then make the wp-config.php file match exactly.

1
0

When you created the database on the new hosting area, did you correctly add a new user, assign that user to the database, AND select ALL the privileges in 'Manage User Privileges'? If you haven't correctly assigned the privileges to the user, then this may well cause your problem.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.