标签:res netstat mysql 阿里云 公网 password 数据库服务 debian cal
cat /etc/mysql/debian.cnf #查找复制[client]下的password mysql -udebian-sys-maint -p #输入client下的密码 set password for ‘root‘@‘localhost‘ = password(‘123456‘); #修改密码 重启mysql服务,再次登陆
#本机登陆mysql: $:mysql -u root -p #改变数据库: mysql>use mysql; #从所有主机: mysql>grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘youpassword‘ with grant option; mysql>flush privileges;
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf 或者 sudo vim /etc/mysql/my.cnf #注释掉:bind-address = 127.0.0.1 #看下3306端口指向: netstat -an|grep 3306
标签:res netstat mysql 阿里云 公网 password 数据库服务 debian cal
原文地址:https://www.cnblogs.com/wang-shh/p/9348222.html