Debian8 安装配置 MySQL5.6

2018-04-17T20:38:00

安装

使用apt-get安装mariadb-server。

sudo apt-get install mariadb-server

提示输入root用户的密码:mysqlmima
安装成功,输入mysql -uroot -p运行,安装完毕。

配置

使用mysql_secure_installation命令对数据库进行配置,修改root密码等。

sudo mysql_secure_installation

信息如下

- Enter current password for root (enter for none): (第一次没有密码)
- Change the root password? [Y/n] (修改 root 密码)
- Set root password? [Y/n] y (设置 root 密码)
- Remove anonymous users? [Y/n] y (移除匿名账户)
- Disallow root login remotely? [Y/n] y (禁用 root 远程登录)
- Remove test database and access to it? [Y/n] y (删除 test 数据库和访问权限)
- Reload privilege tables now? [Y/n] y (刷新权限)
当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »