ubuntu安装mysql 8.0.29

  1. 安装
sudo apt update
sudo apt install mysql-server
sudo systemctl start mysql.service
  1. 修改默认密码
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpasswd';
exit;
  1. 远程登录
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
bind-address            = 0.0.0.0
systemctl restart mysql

参考资料

  1. https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
  2. https://stackoverflow.com/questions/50691977/how-to-reset-the-root-password-in-mysql-8-0-11
  3. https://stackoverflow.com/questions/50570592/mysql-8-remote-access

posted on 2022-06-17 09:56  荷楠仁  阅读(120)  评论(0编辑  收藏  举报

导航