MySQL客户端下载链接:https://downloads.mysql.com/archives/community/
mysql-community-client-5.7.30-1.el7.x86_64.rpm
mysql-community-common-5.7.30-1.el7.x86_64.rpm
mysql-community-libs-5.7.30-1.el7.x86_64.rpm
3个必选
8.0.22以上的版本是4个,多个client-plugins
mysql-community-client-plugins-8.1.0-1.el7.x86_64.rpm
上传服务器后开始安装:
rpm -ivh mysql-community-*
安装报错:(可以试试跳过这步,直接到下载ncurses-compat-libs这步)
下载离线包:
sudo yum install yum-utils yumdownloader ncurses-libs
离线安装:
sudo yum localinstall ncurses-libs-*.rpm
查找所需的libncurses.so.*位置
find /usr/lib64 -name "libncurses.so.*" find /usr/lib64 -name "libtinfo.so.*"
find /usr/lib64 -name "libtinfo.so.*"
创建软连接
sudo ln -s /usr/lib64/libncurses.so.6 /usr/lib64/libncurses.so.5
sudo ln -s /usr/lib64/libtinfo.so.6 /usr/lib64/libtinfo.so.5
再次安装:rpm -ivh mysql-community-*
还不行的话:
下载ncurses-compat-libs
sudo yum install --downloadonly --downloaddir=/mysql ncurses-compat-libs
安装ncurses-compat-libs
sudo yum install ncurses-compat-libs-6.3-14.oe2203sp2.x86_64.rpm
再次安装:rpm -ivh mysql-community-*
测试连接:
mysql -h 10.9.7.27 -P4000 -u root -p