每次设置root和远程访问都容易出现问题, 总结了个通用方法, 关键在于实用
step1:
# mysql -u root mysql
mysql> Grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option; //增加远程访问权限
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
//增加root密码,如果修改密码时报错, Unknown column 'password' in 'field list',改为update user set authentication_string=password('123456') where user='root'
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
step2:
在ubuntu上可以
修改
/etc/mysql/mysql.conf.d/mysqld.cnf
的 bind-address = 127.0.0.1 这一行注释掉即可
step3:
# /etc/init.d/mysql restart
QQ 107966750
实用!
还不行,试试这个
use mysql;
CREATE USER 'user_test'@'%' IDENTIFIED BY 'user_test';
grant select,update,delete,insert,REPLICATION CLIENT on *.* to user_test@'%';
flush privileges;
如果还是不行,请调整bind adress
位于 /etc/mysql/mysql.conf.d/mysqld.cnf
调整 bind-address = 真实IP (默认是 127.0.0.1)
kafka 现实所有topic
git 相关
- git checkout . (直接回滚当前目录一下的所有working tree内的修改,会递归扫描当前目录下的所有子目录)