importing a database into phpmyadmin #1044 - Access denied for user

前端 未结 4 1066
谎友^
谎友^ 2021-01-01 22:53

I have recently purchased web hosting service at godaddy. I have already completed my project and i used xampp. Now i want to import the database which i arleady have. I tr

相关标签:
4条回答
  • 2021-01-01 23:26

    Must Ensure that your User_Name, Password and Database name are correct. If you are Deal with database 'sampled' then type 'sampled' in query instead of 'db' also must ensure that you don't have to use quota(') in Statement. For More and Accurate Detail visit Following link: http://onephin.com/1044-access-denied-user-user_namelocalhost-database-database_name/

    0 讨论(0)
  • 2021-01-01 23:29

    Many web hosts only give you access to one database. Your SQL file is trying to create a new database (with a line near the top like CREATE DATABASE `socialnew`... as you see in the error message).

    The likely solution is to not create the database from your script. You can either edit the .sql file manually and remove the lines starting with CREATE DATABASE `socialnew`... and USE `socialnew`;, or, if your phpMyAdmin is pretty up-to-date, you could do the export again from your XAMPP and make sure the checkbox is not selected for "Add CREATE DATABASE / USE statement".

    Then when doing the import, make sure you're selecting the Import tab from within the database you wish to import to.

    0 讨论(0)
  • 2021-01-01 23:36

    You may also open the .sql file in an IDE and just delete the create command.Then, assuming you've navigated to the desired DB import section in phpMyAdmin, you can run the import with the modified file and you should be good to go.

    0 讨论(0)
  • 2021-01-01 23:36

    Export and import just tables of the database:

    -> open the database in phpmyadmin
    -> click to export
    -> save the file (you don't have to change any settings)
    -> open the database on new server
    -> click to import
    -> chose the file
    -> click to "GO" and you are done...

    It was working for me :-)

    0 讨论(0)
提交回复
热议问题