mysql安装密码不是root_软件安装 - mysql安装时不要求 root 密码

我使用 apt install mysql-server 在 16.04上安装 MySQL,但是在安装过程中,它没有请求 root 密码。

安装之后我得到 ERROR 1045,当我尝试登录 root,mysql_secure_installation 出现了同样的错误。

怎么修复这个问题?

这是我的安装日志:The following additional packages will be installed:

libaio1 mysql-client-5.7 mysql-client-core-5.7 mysql-server-5.7

mysql-server-core-5.7

Suggested packages:

mailx tinyca

The following NEW packages will be installed:

libaio1 mysql-client-5.7 mysql-client-core-5.7 mysql-server mysql-server-5.7

mysql-server-core-5.7

0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.

Need to get 0 B/17,9 MB of archives.

After this operation, 160 MB of additional disk space will be used.

Do you want to continue? [Y/n] y

Preconfiguring packages.. .

Selecting previously unselected package libaio1:amd64.

(Reading database.. . 227144 files and directories currently installed.)

Preparing to unpack.. ./libaio1_0.3.110-2_amd64.deb.. .

Unpacking libaio1:amd64 (0.3.110-2).. .

Selecting previously unselected package mysql-client-core-5.7.

Preparing to unpack.. ./mysql-client-core-5.7_5.7.12-0ubuntu1_amd64.deb.. .

Unpacking mysql-client-core-5.7 (5.7.12-0ubuntu1).. .

Selecting previously unselected package mysql-client-5.7.

Preparing to unpack.. ./mysql-client-5.7_5.7.12-0ubuntu1_amd64.deb.. .

Unpacking mysql-client-5.7 (5.7.12-0ubuntu1).. .

Selecting previously unselected package mysql-server-core-5.7.

Preparing to unpack.. ./mysql-server-core-5.7_5.7.12-0ubuntu1_amd64.deb.. .

Unpacking mysql-server-core-5.7 (5.7.12-0ubuntu1).. .

Selecting previously unselected package mysql-server-5.7.

Preparing to unpack.. ./mysql-server-5.7_5.7.12-0ubuntu1_amd64.deb.. .

Unpacking mysql-server-5.7 (5.7.12-0ubuntu1).. .

Selecting previously unselected package mysql-server.

Preparing to unpack.. ./mysql-server_5.7.12-0ubuntu1_all.deb.. .

Unpacking mysql-server (5.7.12-0ubuntu1).. .

Processing triggers for libc-bin (2.23-0ubuntu3).. .

Processing triggers for man-db (2.7.5-1).. .

Processing triggers for systemd (229-4ubuntu4).. .

Processing triggers for ureadahead (0.100.0-19).. .

Setting up libaio1:amd64 (0.3.110-2).. .

Setting up mysql-client-core-5.7 (5.7.12-0ubuntu1).. .

Setting up mysql-client-5.7 (5.7.12-0ubuntu1).. .

Setting up mysql-server-core-5.7 (5.7.12-0ubuntu1).. .

Setting up mysql-server-5.7 (5.7.12-0ubuntu1).. .

update-alternatives: using/etc/mysql/mysql.cnf to provide/etc/mysql/my.cnf (my.cnf) in auto mode

Checking if update is needed.

This installation of MySQL is already upgraded to 5.7.12, use --force if you still need to run mysql_upgrade

Setting up mysql-server (5.7.12-0ubuntu1).. .

Processing triggers for libc-bin (2.23-0ubuntu3).. .

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值