Install and Config MySQL 8 on Ubuntu
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
withbind-address = 0.0.0.0
Then restart mysql by sudo service mysql restart
.
相关推荐
CoderToy 2020-11-16
emmm00 2020-11-17
王艺强 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11
敏敏张 2020-11-11
世樹 2020-11-11