码迷,mamicode.com
首页 > 数据库 > 详细

Install and Config MySQL 8 on Ubuntu

时间:2020-06-10 13:03:10      阅读:71      评论:0      收藏:0      [点我收藏+]

标签:ble   word   ddr   flush   caching   with   serve   mysqld   complete   

Remove Completely and Install

sudo apt-get remove --purge "mysql*"
sudo apt-get purge "mysql*"
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get remove dbconfig-mysql
sudo apt-get dist-upgrade
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get update && sudo apt-get install mysql-server

Enable Remote Access

su root
mysql -uroot -e "     ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH caching_sha2_password BY ‘yourpasswd‘;     CREATE USER ‘root‘@‘%‘ IDENTIFIED BY ‘yourpasswd‘;     GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘;     FLUSH PRIVILEGES;"

In /etc/mysql/mysql.conf.d/mysqld.cnf:

  • replace bind-address = 127.0.0.1 with bind-address = 0.0.0.0

Then restart mysql by sudo service mysql restart.

Install and Config MySQL 8 on Ubuntu

标签:ble   word   ddr   flush   caching   with   serve   mysqld   complete   

原文地址:https://www.cnblogs.com/ToRapture/p/13084239.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!