Questions tagged «mysql-error-1007»

5
将SQL转储导入MySQL时出错:未知数据库/无法创建数据库
我很困惑如何导入SQL转储文件。如果没有先在MySQL中创建数据库,我似乎无法导入数据库。 这是database_name尚未创建时显示的错误: username=有权访问原始服务器上数据库的用户的用户名。 database_name=来自原始服务器的数据库名称 $ mysql -u username -p -h localhost database_name < dumpfile.sql Enter password: ERROR 1049 (42000): Unknown database 'database_name' 如果我以root用户身份登录MySQL并创建数据库, database_name mysql -u root create database database_name; create user username;# same username as the user from the database I got the dump from. grant all privileges on …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.