Ubuntu 安装mysql
安装:
sudo apt update
sudo apt install mysql-server
查看mysql状态
sudo systemctl status mysql
Ubuntu 查看mysql账户密码
sudo cat /etc/mysql/debian.cnf
取消ip访问限制
MySQL取消ip访问限制
.注释bind-address = 127.0.0.1。
命令:
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address = 127.0.0.1注释掉(即在行首加#),如下:
代码如下:
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
# bind-address = 127.0.0.1
除了注视掉这句话之外&