許多同學在做MySQL數(shù)據(jù)庫測試時苦于沒有測試數(shù)據(jù)默伍,除了線上導一小段數(shù)據(jù)镰吆、或者利用sysbench生成測試數(shù)據(jù)外症虑,官方其實也提供了了一套名為:Employees Sample Database的測試庫(該測試庫含有6個表抬吟,總計4百萬數(shù)據(jù)記錄)
測試數(shù)據(jù)庫導入文件下載:https://launchpad.net/test-db/
下載到的文件一般為:employees_VERSION.tar.bz2
$ bunzip2 employees_VERSION.tar.bz2
$ cd employees_VERSION
$ mysql -t < employees.sql
If something goes wrong, you can inspect the proceedings using
the verbose output
$ mysql -v -v -v -t < employees.sql
數(shù)據(jù)校驗工具,分為md5和sha兩種方式:
$ mysql -t < test_employees_md5.sql
$ mysql -t < test_employees_sha.sql
官方安裝指南:
https://dev.mysql.com/doc/employee/en/