MySQL员工数据库安装

时间:2017-06-12 09:36:42

标签: mysql installation wampserver failed-installation

我在安装这个数据库时遇到了很多困难。我已经看过并尝试了许多不同的导入方法,但仍然没有。我知道这可能是之前发布过但我无法找到答案让这项工作。

似乎没有任何东西可以看到.DUMP文件,但肯定有;

What the Temp Directory looks like

我正在使用新版本的WAMP,我已经能够用来安装" Sakila DB"

我已将https://github.com/datacharmer/test_db的完整文件解压缩到以下目录; C:\ TEMP \ TEST_DB主

然后我从这个位置用CMD打开MySQL应用程序:C:\ Users \ skino>" C:\ Program Files \ MySQL \ MySQL Workbench 6.3 CE \ mysql.exe" -u root -p

然后给我 MySQL> 提示

之后我使用以下命令将CD发送到目录并加载SQL。

SOURCE C:/temp/test_db-master/employees.sql

然后我得到以下...任何人都可以告诉我哪里出错了

mysql> SOURCE C:/temp/test_db-master/employees.sql
Query OK, 8 rows affected (0.91 sec)

Query OK, 1 row affected (0.00 sec)

Database changed
+-----------------------------+
| INFO                        |
+-----------------------------+
| CREATING DATABASE STRUCTURE |
+-----------------------------+
1 row in set (0.00 sec)

Query OK, 0 rows affected, 6 warnings (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

+------------------------+
| INFO                   |
+------------------------+
| storage engine: InnoDB |
+------------------------+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.23 sec)

Query OK, 0 rows affected (0.56 sec)

Query OK, 0 rows affected (0.29 sec)

Query OK, 0 rows affected (0.31 sec)

Query OK, 0 rows affected (0.38 sec)

Query OK, 0 rows affected (0.31 sec)

Query OK, 0 rows affected (0.03 sec)

Query OK, 0 rows affected (0.05 sec)

Query OK, 0 rows affected (0.00 sec)

+---------------------+
| INFO                |
+---------------------+
| LOADING departments |
+---------------------+
1 row in set (0.00 sec)

ERROR:
Failed to open file 'load_departments.dump', error: 2
+-------------------+
| INFO              |
+-------------------+
| LOADING employees |
+-------------------+
1 row in set (0.00 sec)

ERROR:
Failed to open file 'load_employees.dump', error: 2
+------------------+
| INFO             |
+------------------+
| LOADING dept_emp |
+------------------+
1 row in set (0.00 sec)

ERROR:
Failed to open file 'load_dept_emp.dump', error: 2
+----------------------+
| INFO                 |
+----------------------+
| LOADING dept_manager |
+----------------------+
1 row in set (0.00 sec)

ERROR:
Failed to open file 'load_dept_manager.dump', error: 2
+----------------+
| INFO           |
+----------------+
| LOADING titles |
+----------------+
1 row in set (0.00 sec)

ERROR:
Failed to open file 'load_titles.dump', error: 2
+------------------+
| INFO             |
+------------------+
| LOADING salaries |
+------------------+
1 row in set (0.00 sec)

ERROR:
Failed to open file 'load_salaries1.dump', error: 2
ERROR:
Failed to open file 'load_salaries2.dump', error: 2
ERROR:
Failed to open file 'load_salaries3.dump', error: 2
ERROR:
Failed to open file 'show_elapsed.sql', error: 2
mysql> 

2 个答案:

答案 0 :(得分:0)

我的猜测是你已经安装了MYSQL Workbench的版本,它还附带了一个MYSQL实例。所以现在你安装了2台MYSQL服务器。

您正在加载一个,然后在另一个中查找数据库。

卸载MYSQL Workbench及其附带的MYSQL实例。这将只留下WAMPServer附带的MYSQL。

然后重新安装MYSQL Workbench,也不要选择安装数据库服务器。

然后,您可以将Workbench连接到WAMPServer附带的MYSQL。

答案 1 :(得分:0)

所有您需要做的是:打开MySQL工作台。然后“文件”>“运行SQL脚本”选择employee.sql文件。简单运行。 祝你好运