uos安装mysql


sudo apt-get install -y mysql-server mysql-client        

没有候选版本

 

网上学习:https://cloud.tencent.com/developer/article/1611087

跟着教程一步一步安装好了,但是mysql -u root -p 提示无mysql

 

解决办法:
touch ~/.bash_profile


export PATH=$PATH:/usr/local/mysql-8.0.26-linux-glibc2.12-x86_64/bin 这个文件夹中有一个mysql文件的


source ~/.bash_profile

 

好了,再次连接mysql又提示:mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

 

通过搜索,好像是版本不对。我通过这个Catfish 文件搜索(商店下载),找了到所有包含了libtinfo

 

然后将这个文件软连接一下sudo ln -s /usr/lib/x86_64-linux-gnu/libtinfo.so.6.1 /usr/lib/x86_64-linux-gnu/libtinfo.so.5

登陆成功修改密码

alter user 'root'@'localhost' identified by '123456';



启动mysql

cd /usr/local/mysql-8.0.19-linux-glibc2.12-x86_64/support-files 
sudo ./mysql.server start

 开机启动:

cp /usr/local/mysql-8.0.19-linux-glibc2.12-x86_64/support-files/mysql.server /etc/init.d/mysql
cd /etc/rc2.d
sudo ln -s /etc/init.d/mysql S20mysql

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM