Ubuntu 14.04 LTS apt-get mysql无密码安装

来源:互联网 发布:oracle数据库停止命令 编辑:程序博客网 时间:2024/06/07 02:57

Mysql无密码安装,就是跳过输入密码的弹出窗口,只需3步。


第一步,新建一个 mysql-passwd 文件,内容如下:


debconf mysql-server/root_password password root

debconf mysql-server/root_password_again password root



第二步,使其文件生效:


debconf-set-selections mysql-passwd


第三步,安装 Mysql,加 -y 参数跳过:


apt-get install mysql-server-y



参考文章:http://www.2cto.com/database/201206/137862.html


0 0