㈠ 如何在mysql中批量添加用户
可以用shell写个脚本批量添加mysql用户:
#!/bin/bash
i=$1;
MAX_INSERT_ROW_COUNT=$2;
while[$i-le$MAX_INSERT_ROW_COUNT]
do
mysql-uopensips-popensipsrwopensips-e"insertintosubscriber(username,password)values('10$i',10$i);"
d=$(date+%M-%d\%H:%m:%S)
echo"INSERTusername10$ion$d"
i=$((i+1))
sleep0.05
done
exit0