Transfering sql database using phpmyadmin

Posted on 2012-08-22
Last Modified: 2012-08-22
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.
Question by:dannyfccs
    LVL 49

    Accepted Solution

    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.

    Author Comment

    Can I send you a copy of the backup so you can see what lines I need to delete?

    Author Comment

    Don't worry think I've sorted it.

    Author Comment

    Thanks for your help, I had to delete a line from the script.
    LVL 49

    Expert Comment

    by:Julian Hansen
    Cool - glad to be of help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
    The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now