标签:uid hub user htm debian install strong logs window
本文首发于个人博客https://kezunlin.me/post/36e618e7/,欢迎阅读!
mysql user guide on ubuntu 16.04 and windows 10
sudo apt-get install mysql-server
# root,123456
mysql -uroot -p123456
cd /etc/mysql
grep -r 'bind-address' .
./mysql.conf.d/mysqld.cnf:bind-address = 127.0.0.1
change bind-address
to 0.0.0.0
vim ./mysql.conf.d/mysqld.cnf
bind-address = 0.0.0.0
# or
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/mysql.conf.d/mysqld.cnf
# restart
service mysql restart
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
mysql> flush privileges;
check for users.
mysql> use mysql;
mysql> select user,host from user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)
OK. Now we can access mysql from remote machine.
mysql -uroot -p123456 -h 192.168.0.130
OK
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
mysql> flush privileges;
close fireware and allow 3306 tcp connection.
mysql -uroot -p123456 -h 192.168.0.130
or by mysql client.
ubuntu 16.04 和 windows 10系统安装mysql 允许远程访问 | mysql user guide on ubuntu 16.04 and windows 10
标签:uid hub user htm debian install strong logs window
原文地址:https://www.cnblogs.com/kezunlin/p/11840263.html