sheel 脚本批量插数据
#!/bin/bash
i=1
while [ $i -le 100000000 ]
do
mysql -uroot -proot -h127.0.0.1 test -e "insert into student_test (name,createTime) values ('student$i',NOW());"
i=$(($i+1))
done
- -u账户
- -p密码
- -h远程服务器地址
- test数据库
#!/bin/bash
i=1
while [ $i -le 100000000 ]
do
mysql -uroot -proot -h127.0.0.1 test -e "insert into student_test (name,createTime) values ('student$i',NOW());"
i=$(($i+1))
done