问题
I have just finished a Wordpress site and I'm trying to set it up on the server. I did the following, as always:
- uploaded a .htaccess file to a public_html folder with the text from https://codex.wordpress.org/htaccess (basic WP)
- moved all the contents from the local wordpress folder to public_html
- exported my local database and changed all instances of 'localhost/siteName/wordpress' with 'www.siteAddress.com'
- created a mySQL database in cPanel's mySQL section
- created a new user in cPanel's mySQL section
- changed the wp_config file so that db_name, db_user and db_password values mach the prefix_name, prefix_username and user password of the newly created db/user
- added that user to the database with all privileges granted
- TRIED to import the exported local database to server via cPanel's phpMyadmin section. That's where I got this error:
1044 - Access denied for user 'something'@'localhost' to database 'else'
Of course, 'something' and 'else' are not the real values... Can anyone tell me if I did something wrong, or I didn't do something else at all? I never had this problem before? The differences are that the Wordpress itself got updated in the meantime and I worked with WooCommerce for the first time... if it matters, though I suspect it doesn't.
Thanks in advance, I know it's a bit of reading :)
[EDIT]: I tried the same procedure again (third time in a row), and it worked... so, the solution would be - the question itself.
回答1:
Take a look at this dzenesiz and see if this helps.
http://www.inmotionhosting.com/support/website/database-troubleshooting/mysql-1044-access-denied-error-message
来源:https://stackoverflow.com/questions/31083852/migrating-wordpress-database-to-server-sql-error