#!/bin/bash #开头必写
1 #数据库密码初始化 2 pwd="admin" 3 mysql -uroot <<EOF 4 use mysql; 5 UPDATE user SET password=password('${pwd}') WHERE user='root'; 6 flush privileges; 7 exit 8 EOF
#!/bin/bash #开头必写
1 #数据库密码初始化 2 pwd="admin" 3 mysql -uroot <<EOF 4 use mysql; 5 UPDATE user SET password=password('${pwd}') WHERE user='root'; 6 flush privileges; 7 exit 8 EOF