创建数据库
CREATE database testdb;
use testdb;
CREATE TABLE `test_table1` (
`id` int(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL
) AUTO_INCREMENT = 1;
生成测试数据命令
mysqlslap --defaults-file="/etc/my.cnf" --concurrency=50 --iterations=1 --create-schema=testdb --query="insert into test_table1 (name) values(substring(md5(rand()),1,100));" --number-of-queries=1000000 -uroot -p123456 -P3306 -h127.0.0.1