Mysql installation test database employees

1. Download the employees test database file

Official website download: employees official website download

Baidu SkyDrive : Link: Baidu SkyDrive Link Password: 1nhs
Refer to the download link of Active_IT

2. Ubuntu environment installation

1. Open the terminal in the downloaded test database folder directory
2. Enter in the terminal

mysql -uroot -p123456 -t < employees.sql
#-p后跟的是自己的链接数据库密码,根据实际情况修改
#(注意一定要在下载好的文件夹下打开终端)

As shown below, it is obvious that an error has been reported. It is obvious that there is an error on line 38 of employees.sql:
Obviously the results are wrongSolution: Open employees.sql and modify storage_engine to default_storage_engine. Both lines 38 and 44 must be modified , as shown in the following figure:
Insert picture description hereModification completed After saving employees.sql, re-enter the command

mysql -uroot -p123456 -t < employees.sql
#-p后跟的是自己的链接数据库密码,根据实际情况修改
#(注意一定要在下载好的文件夹下打开终端)

The installation of the employees test data course is completed, and the results are marked as shown in the figure below, or the SQL statement is executed to query the information of the database table
Insert picture description here

Reference from the blog of casainurbania

3. Install under windows

1. Win+r enter cmd to enter the command line
2. Find the file location of the employees you downloaded and
Insert picture description herecopy the folder path, enter the command line

cd C:\Program Files\MySQL\employees_db
# cd 复制文件夹的路径 
mysql -uroot -p123456 -t < employees.sql
#-p后跟的是自己的链接数据库密码,根据实际情况修改
#(注意一定要在下载好的文件夹下打开终端)

Insert picture description here
The installation is complete, the verification result, if you encounter mysql is not an internal command, you can refer to solve the problem that mysql is not an internal command
Insert picture description here

Guess you like

Origin blog.csdn.net/cly_32/article/details/112516112