1.修改/etc/my.cnf 在[mysqld]下添加一行skip-grant-tables。2.保存配置文件,重启mysql服务/etc/init.d/mysql restart.3.再次进入MySQL命令行 mysql -uroot -p,输入密码时直接回车,就会进入MySQL数据库了,这个时候按照常规流程修改root密码即可4.回车后进入到mysql界面,输入use mysql回车。随后写UPDATE user SET Pa...【阅读全文】
一.Mysql Binlog格式介绍 Mysql binlog日志有三种格式,分别为Statement,MiXED,以及ROW!1.Statement:每一条会修改数据的sql都会记录在binlog中。优点:不需要记录每一行的变化,减少了binlog日志量,节约了IO,提高性能。(相比row能节约多少性能与日志量,这个取决于应用的SQL情况,正常同...【阅读全文】
在启动mysql出现如下错误:2016-03-08 17:22:01 21968 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 65536 pages, max 0 (relevant if non-zero) pages!2016-03-08 17:22:01 21968 [ERROR] InnoDB: Could not ...【阅读全文】
在启动mysql出现如下警告:2016-03-08 17:22:01 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).解决办法: 在my.cnf文件中添加如下参数,关闭警告: [mysqld] explicit_defa...【阅读全文】