标签:
DB:5.5.14
OS:CentOS 6.3
安装多实例MySQL数据库,安装完成后默认无密码,一次性给所有实例的root账户创建密码:
#!/bin/bash
for i in {3361..3363}
do
/export/servers/mysql/bin/mysql -uroot -S /export/data/mysql/tmp/mysql$i.sock <<EOF
use mysql;
update user set password=password(‘123456‘) where user=‘root‘;
flush privileges;
EOF
done
标签:
原文地址:http://www.cnblogs.com/hankyoon/p/5169609.html