mySQL Workbench导入

har*_*ter 2 mysql-workbench

我试图导入它但我遇到了一些错误.

这是我的错误:

08:49:13 PM恢复dbDB(联系)运行:mysql --defaults-extra-file ="/ tmp/tmpdwf14l/extraparams.cnf"--host = 127.0.0.1 --user = root --port = 3306 - -default-character-set = utf8 - 注释第22行的ERROR 1046(3D000):未选择数据库

使用exitcode 1操作失败08:49:13 PM恢复dbDBB(课程)运行:mysql --defaults-extra-file ="/ tmp/tmpMW20Fb/extraparams.cnf"--host = 127.0.0.1 --user = root - -port = 3306 --default-character-set = utf8 ERROR 1046(3D000)第22行:未选择数据库

Pun*_*015 6

Error:您尚未选择从转储导入数据的默认目标模式在
MySQL中创建模式/数据库,并在从Dump导入数据时在MySQL Workbench中选择该数据库.
Or
您可以编辑转储文件并在开头附加一个SQL语句,如下所示

create database test;
use test;
Run Code Online (Sandbox Code Playgroud)

选择默认目标架构

Solution as per the dump file of user:

--
-- Table structure for table `course`
--
Run Code Online (Sandbox Code Playgroud)

将代码写为:

create database test1;
use test1;
--
-- Table structure for table `course`
--
Run Code Online (Sandbox Code Playgroud)

这应该做.