LINUX篇,设置MYSQL远程访问实用版

 

 

 

每次设置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\

 ./kafka-topics.sh --zookeeper localhost:2181 --list

 

 

 

git 相关

 

git push origin 1.0.0 //提交并新建远程分支
git checkout -b 1.0.0 origin/1.0.0   //映射并更新本地分支到远程分支
 
git fetch origin
git checkout -b 5.0.0 origin/5.0.0
 
 
 
 
还原
 
  • git checkout . (直接回滚当前目录一下的所有working tree内的修改,会递归扫描当前目录下的所有子目录)
取消commit;
 
   git reset HEAD
日志
 
   git log --stat   查看具体提交文件
 
 

 

posted @ 2013-07-09 14:05  何锦彬  阅读(446)  评论(1编辑  收藏  举报