Ubuntu24.04普通安装mysql
1、初始化mysql时报错
/opt/sudytech/mysql/bin/mysqld --initialize-insecure
/opt/sudytech/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
解决方法:
find / -name libaio.so*
/usr/lib/x86_64-linux-gnu/libaio.so
/usr/lib/x86_64-linux-gnu/libaio.so.1t64
/usr/lib/x86_64-linux-gnu/libaio.so.1t64.0.2
cd /usr/lib/x86_64-linux-gnu/
ln -s libaio.so.1t64.0.2 libaio.so.1
2、初始化完成后,登录报错
/opt/sudytech/mysql/bin/mysql -u root -p
/opt/sudytech/mysql/bin/mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
解决方法
#cd /usr/lib/x86_64-linux-gnu
#ll libncursesw.so.6*
lrwxrwxrwx 1 root root 18 Apr 8 2024 libncursesw.so.6 -> libncursesw.so.6.4
-rw-r--r-- 1 root root 239848 Apr 8 2024 libncursesw.so.6.4
#ln -s libncursesw.so.6.4 libncurses.so.5
3、第三次报错
/opt/sudytech/mysql/bin/mysql -u root -p
/opt/sudytech/mysql/bin/mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
解决方法:
# cd /usr/lib/x86_64-linux-gnu/
#ll libtinfo.so.6*
lrwxrwxrwx 1 root root 15 Apr 8 2024 libtinfo.so.6 -> libtinfo.so.6.4
-rw-r--r-- 1 root root 208328 Apr 8 2024 libtinfo.so.6.4
#ln -s libtinfo.so.6.4 libtinfo.so.5