ERROR 1049 (42000): Unknown database 'mydatabasename'

后端 未结 12 1351
故里飘歌
故里飘歌 2020-12-14 07:27

I am trying to restore database from .sql file , i have created the database in phpmyadmin and also using the create if not exist command in the .sql file which i am restori

12条回答
  •  庸人自扰
    2020-12-14 07:40

    I solved because I have the same problem and I give you some clues:

    1.- As @eggyal comments

    mydatabase != mydatabasename
    

    So, check your database name

    2.- if in your file, you want create database, you can't set database that you not create yet:

    mysql -uroot -pmypassword mydatabase

    change it for:

    mysql -uroot -pmypassword 

提交回复
热议问题