MariaDB导入测试数据库employees
具体可参考:
http://dev.mysql.com/doc/empl...
1、下载sample database
mysql employees sample database下载链接
http://dev.mysql.com/doc/empl...
https://github.com/datacharme...
本地搬迁:
https://gitee.com/glc400/test...
2、解压安装包
$ unzip test_db-master.zip
$ cd test_db-master/
3、创建employee用户
$ sudo mysql
MariaDB [(none)]> CREATE USER 'employee'@'%' IDENTIFIED BY 'employee';
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> QUIT;
Bye
4、调整数据库引擎 【MariaDB导入测试数据库employees】The Employees database is compatible with all storage engines. You must edit the employee.sql and comment out the storage engine that you want to use:
set storage_engine = InnoDB;
-- set storage_engine = MyISAM;
-- set storage_engine = Falcon;
-- set storage_engine = PBXT;
-- set storage_engine = Maria;
5、开始导入数据
$ sudo mysql -t < employees.sql
或者使用管理员账户导入:
$ sudo mysql -u admin -p -t < employees.sql
6、查看验证导入的数据 You can validate the Employee data using two methods, md5 and sha. Two SQL scripts are provided for this purpose, test_employees_sha.sql and test_employees_md5.sql. To run the tests, use mysql:
$ sudo time mysql -t < test_employees_sha.sql
$ sudo time mysql -t < test_employees_md5.sql
7、授权
$ sudo mysql
MariaDB [(none)]> GRANT ALL ON employees.* TO employee;
Query OK, 0 rows affected (0.000 sec)
MariaDB [(none)]> QUIT;
Bye
8、测试权限
$ sudo mysql -u employee -p
MariaDB [(none)]> show databases;
+--------------------+
| Database|
+--------------------+
| employees|
| information_schema |
+--------------------+
2 rows in set (0.000 sec)
其他 Employee测试数据库语句:
https://segmentfault.com/a/11...
推荐阅读
- Docker应用:容器间通信与Mariadb数据库主从复制
- 女生该不该用小号测试男朋友()
- BNC公链|BNC公链 | Eth2.0测试网Topaz已质押超100万枚ETH
- 没有导入future这个module
- 我的软件测试开发工程师书单
- 性能测试中QPS和TPS的区别
- R|R for data Science(六)(readr 进行数据导入)
- 如何在手机上查看测试vue-cli构建的项目
- 工作好忙
- javascript|javascript 性能测试笔记