【发布时间】:2021-06-07 03:12:24
【问题描述】:
系统debian 10,通过以下步骤安装mysql服务器:
- dpkg -i mysql-apt-config_0.8.17-1_all.deb
- apt-get 更新
- apt-get install -y mysql-server 并得到了
2021-06-07T02:21:11.312176Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.25) initializing of server in progress as process 1838
2021-06-07T02:21:11.325988Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-06-07T02:21:11.825707Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-06-07T02:21:13.160846Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
Setting up mysql-server (8.0.25-1debian10) ...
Processing triggers for libc-bin (2.28-10) ...
root@a5cfe5ec0be9:/web_api# service mysql start
mysql: unrecognized service
然后我尝试使用mysql,我得到了
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
我试图对服务进行分层,但没有找到
mysql: unrecognized service
root@937f56df67cd:~# service mysqld start
mysqld: unrecognized service
在以下文件夹中找不到mysql:
/etc/init.d# ls
hwclock.sh procps ssh
【问题讨论】: