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

前端 未结 4 1114
谎友^
谎友^ 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: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.

提交回复
热议问题