ubuntu mysql fail to start with exit code 1
ubuntu do-release-upgrade之后,ubuntu mysql fail to start with exit code 1
主要原因是缺少了一些动态链接库*.so.*之类的文件,具体排除方法如下:
ldd /usr/bin/mysql OR /usr/sbin/mysql
查看哪些so文件是not found,举例说明:本机升级之后缺少如下文件:
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x0000729bc5407000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x0000729bc5402000)
**libcrypto.so.1.1 => not found
libssl.so.1.1 => not found**
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x0000729bc53ef000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x0000729bc53e8000)
**libtinfo.so.5 => not found**
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000729bc5000000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000729bc52ff000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x0000729bc52d2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000729bc4c00000)
/lib64/ld-linux-x86-64.so.2 (0x0000729bc5418000)
然后针对性的安装缺失文件即可。
另外,还要继续查看mysqld缺少哪些so文件,
ldd /usr/local/mysql/bin/mysqld OR /usr/sbin/mysqld OR /usr/bin/mysqld
继续将缺失的文件找回来或者安装回来,
比如可以将版本号修改复制
sudo cp /usr/lib/x86_64-linux-gnu/libicuuc.so /lib/x86_64-linux-gnu/libicuuc.so.70
参考文件:
https://blog.csdn.net/u013421629/article/details/136951006
https://www.cnblogs.com/hufulinblog/p/10124001.html