您的位置:首页 > 科技 > IT业 > ubuntu20离线安装mysql5.7

ubuntu20离线安装mysql5.7

2024/11/19 17:03:52 来源:https://blog.csdn.net/weixin_45379185/article/details/141073249  浏览:    关键词:ubuntu20离线安装mysql5.7

1下载安装包

wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mecab/libmecab2_0.996-1.2ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.110-2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.2-0ubuntu2_amd64.deb
wget https://cdn.mysql.com/archives/mysql-5.7/mysql-server_5.7.34-1ubuntu18.04_amd64.deb-bundle.tar
tar -xvf mysql-server_5.7.34-1ubuntu18.04_amd64.deb-bundle.tar

2安装

sudo dpkg -i libmecab2_0.996-1.2ubuntu1_amd64.deb
sudo dpkg -i libaio1_0.3.110-2_amd64.deb
sudo dpkg -i libtinfo5_6.2-0ubuntu2_amd64.deb
sudo dpkg -i mysql-common_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg-preconfigure mysql-community-server_5.7.34-1ubuntu18.04_amd64.deb    //此步需要输入数据的root密码
sudo dpkg -i libmysqlclient20_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-client_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-client_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-common_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-server_5.7.34-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-server_5.7.34-1ubuntu18.04_amd64.deb

3MySQL配置

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

打开文件后将bind-address修改为0.0.0.0
bind-address = 0.0.0.0(修改后)

进入数据库

mysql -u root -p
输入密码use mysql;
update user set host = '%' where user = 'root'; 
flush privileges;

参考
https://blog.csdn.net/qq_57425280/article/details/139000251
https://blog.csdn.net/wd520521/article/details/127262726

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com