1.先从git文件下载需要的内容包括数据库的到自己电脑上
2.我的文件在home/hoke里面
1) tarena@tedu:~$ cd hoke
2) tarena@tedu:~/hoke$ cd migrations/
3) tarena@tedu:~/hoke/migrations$ ls
hoke.sql HOKE数据表设计.docx
3.将文件拷贝到数据库中
1)tarena@tedu:~/hoke/migrations$ mysql -uroot -p < hoke.sql
Enter password:
4.打开mysql查看是否拷贝成功
1)tarena@tedu:~/hoke/migrations$ mysql -uroot -p
Enter password:
5.show databases 查看数据库
1)mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hoke | //这里就是拷贝好的数据库
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
6.show tables 查看工作表
1)mysql> show tables;
+---------------------+
| Tables_in_hoke |
+---------------------+
| admin_login_log |
| admin_user |
| category |
| category_recommends |
| collection |
| download |
| loves |
| plugins |
| pw_recovery |
| review |
| user |
| week_recommends |
+---------------------+
12 rows in set (0.00 sec)
以上就是工作表
网友评论