创建用户并授权---------------------------------------------------------grant all privileges on *.* to 'www'@'localhost' identified by '123456'; #授权www,所有操作,所有表权限grant all privileges on *.* to 'navicat'@'%' identified by '123456'; #授权navicat,所有操作,所有表,所有主机权限flush privileges; #刷新
show grants for 'www'@'localhost'; #查看权限DROP USER 'www'@'host';
mysql基本知识:日志文件
=======================================开启/关闭日志修改 /etc/my.cnf #log-bin=mysql-bin #重启mysql #reset master;mysql日志show variables like '%log_bin%';
=======================================mysql 二进制文件show binary logs;显示当前二进制文件show master status;
=======================================删除之前的所有bin-log文件reset master;删除 xx 文件之前的所有bin-log文件purge binary logs to 'mysql-bin.000018';
=======================================显示日志事件show binlog events;show binlog events in 'mysql-bin.000005';
转载于:https://www.cnblogs.com/xielisen/p/5403304.html