我正在try 自动响应mysql_secure_安装脚本.我的代码如下:
echo "& y y abc abc y y y y" | ./usr/bin/mysql_secure_installation
我正在自动处理的实际问题如下:
Enter current password for root (enter for none): <enter>
Set root password? [Y/n] y
New password: abc
Re-enter new password: abc
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
但它给了我一个错误"抱歉,你不能在这里使用空密码",但在屏幕上,我习惯于按返回键回答第一个问题.