阿里云最近有了ubuntu24,手欠直接选了24系统来试水,安装mysql这里遇到麻烦了
其它问题参考ubuntu22的即可,以下是3个新问题:
阿里云ubuntu 24 deb安装mysql5.7遇到的3个问题:
1)libssl1.1 (>= 1.1.1) but it is not installable 解决
安装Mysql5.7报错,因为ubuntu22里已经不再提供libssl1.1版本了
解决办法是添加ubuntu20的库来安装libssl1.1,对ubuntu24也适用
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt-get update
sudo apt-get install libssl1.1
2)E: Package 'libaio1' has no installation candidate
这个没辙了,找了半天没找到合适的配置方法。最后只能通过直接安装dpk解决:
链接:Index of /debian/pool/main/liba/libaio
下载后apt install ./libaio1_0.3.113-5_amd64.deb
安装包一览:
libevent-core-2.1-6_2.1.8-stable-4build1_amd64.deb
libmysqlclient20_5.7.40-1ubuntu18.04_amd64.deb
libmysqlclient20_5.7.42-0ubuntu0.18.04.1_amd64.deb
mysql-client-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb
mysql-client-core-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb
mysql-common_5.7.33-0ubuntu0.16.04.1_all.deb
mysql-server-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb
mysql-server-core-5.7_5.7.42-0ubuntu0.18.04.1_amd64.deb
安装后的模块一览:
ii libmysqlclient20:amd64 5.7.42-0ubuntu0.18.04.1 amd64 MySQL database client library
ii mysql-client-5.7 5.7.42-0ubuntu0.18.04.1 amd64 MySQL database client binaries
ii mysql-client-core-5.7 5.7.42-0ubuntu0.18.04.1 amd64 MySQL database core client binaries
ii mysql-common 5.8+1.1.0build1 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server-5.7 5.7.42-0ubuntu0.18.04.1 amd64 MySQL database server binaries and system database setup
ii mysql-server-core-5.7 5.7.42-0ubuntu0.18.04.1 amd64 MySQL database server binaries
ii libevent-core-2.1-6:amd64 2.1.8-stable-4build1 amd64 Asynchronous event notification library (core)
ii libevent-core-2.1-7t64:amd64 2.1.12-stable-9ubuntu2 amd64 Asynchronous event notification library (core)
然后默认登录不了的问题在配置里设置skip-grant-tables,然后将root用户行的密码的auth_socket模式修改为mysql_native_password就成为 本地root空密码登录了。然后就可以配置安全信息
3)下一步你会发现内网的机器连不上mysql,甚至telnet <内网IP> 3306 都不行。一看配置:NND,这个安装后的默认配置可坑爹了:
再远程访问,MYSQL通了,这样对等网内网的MYSQL就安装完成了