• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 818
  • Last Modified:

Transfering sql database using phpmyadmin

When trying to transfer a wordpress sql database using phpmyadmin from my existing Windows server to my new Linux server I get the following error message see below.

#1044 - Access denied for user 'name'@'%' to database 'wp_name'

I've replaced the name of the database and username with name, I've tried keeping the database name the same and it says it already exists, I've kept the username the same as the current username and it says it doesn't have permission, where am I going wrong?

I've searched the error message and nothing helps me resolve this, I have a number of domains to transfer with wordpress databases and this is stopping me from doing so at present.
0
dannyfccs
Asked:
dannyfccs
  • 3
  • 2
1 Solution
 
Julian HansenCommented:
The message is telling you what you need to know that the user account you are using does not have permission to logon to that database.

Things to look for are:

When you  transferred the database did the script include a create database statement or a use database satement.

Did you create a database before hand and give a user rights to that database?

Proper process for this is as follows

1. Create the database on the destination server
2. Create the user account to access the new database
3. Export data from existing data but don't include create or use database statements - check the exported file for these and remove if they are there.
4. log into new database with id created in 2.
5. Import new database script
6. Check that import was successful in PHPMyAdmin - ensure all tables are there.
7. Update wordpress config with database name (from step 1) username and password from step 2.
8. If this is the first time you are using the new server verify the server connection details - whether you need to use localhost or an IP or a specific host name - your ISP will be able to tell this. You will also need to determine if the database is configured for a different port from the default 3306 (sometimes it is changed to 3307 - but again check with your ISP).

That should work.
0
 
dannyfccsAuthor Commented:
Can I send you a copy of the backup so you can see what lines I need to delete?
0
 
dannyfccsAuthor Commented:
Don't worry think I've sorted it.
0
 
dannyfccsAuthor Commented:
Thanks for your help, I had to delete a line from the script.
0
 
Julian HansenCommented:
Cool - glad to be of help
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now