当前位置:   article > 正文

ubuntu安装mysql8_ubuntu24 离线安装mysql8

ubuntu24 离线安装mysql8

1、安装mysql8
sudo apt install mysql-server

sudo mysql -u root -p

set global validate_password_policy=LOW;

		ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '123456';

update user set host = '%' where user ='root';

flush privileges;
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

2、修改mysql的配置文件

cd /etc/mysql/
  • 1

修改my.cnf文件
增加两行

bind-address = 0.0.0.0
mysqlx-bind-address = 0.0.0.0
  • 1
  • 2

3、开机自启动并重启mysql
sudo systemctl enable mysql

sudo systemctl restart mysql

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/978496
推荐阅读
相关标签
  

闽ICP备14008679号