The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
意思貌似MYSQL还运行在 --skip-grant-tables模式,如何让他回到原来的模式

第一种方法:原来在mysql.ini文件中配置了skip-grant-tables,前面加个#注释掉就可以了

修改mysql的配置文件,把skip-grant-tables去掉后,重启mysql

第二种:

The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解决办法:

mysql> set global read_only=0;
(关掉新主库的只读属性)

flush privileges;

set global read_only=1;(读写属性)

flush privileges;

Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

mysql> SET SESSION binlog_format = 'ROW';
mysql> SET GLOBAL binlog_format = 'ROW';

解释:

set global read_only=0; 关闭只读,可以读写
set global read_only=1; 开始只读模式

mysql> set global read_only=0; Query OK, 0 rows affected (0.00 sec)  mysql> show variables like '%read_only%'; +------------------+-------+ | Variable_name  | Value | +------------------+-------+ | innodb_read_only | OFF  | | read_only    | OFF  | | tx_read_only   | OFF  | +------------------+-------+ 3 rows in set (0.00 sec)  mysql> set global read_only=1; Query OK, 0 rows affected (0.00 sec)  mysql> show variables like '%read_only%'; +------------------+-------+ | Variable_name  | Value | +------------------+-------+ | innodb_read_only | OFF  | | read_only    | ON  | | tx_read_only   | OFF  | +------------------+-------+ 3 rows in set (0.00 sec) 

更多相关文章

  1. use ffmpeg to setup streaming server on android
  2. Android(安卓)LocalSocket / LocalServerSocket sample code
  3. android ScreenObserver 实现打开锁屏键时,跳到指定的页面
  4. android targetSdkVersion / alertdialog pop error when runnin
  5. Android(安卓)学习笔记--android――Activity生命周期,server,Br
  6. FregServer进程,发送BC_TRANSACTION,唤醒ServiceManager进程,返回BR
  7. ionic cordova build android 打包巨慢,一直在Running command的
  8. 使用NanoHttpd在Android上实现HttpServer
  9. Android(安卓)监听短信2种方式:Broadcast和ContentObserver

随机推荐

  1. Android对接webService接口
  2. Android中贪吃蛇游戏的学习(二)
  3. 打开Android Studio报错"required plugin
  4. Android-- Intent.Action(1)
  5. 关于listView设置背景引起StackOverflowE
  6. Android gradle 命令行打包
  7. Android 的EditText实现不可编辑
  8. 【Android】【Lottie】在Android中使用Lo
  9. [导入]Android平台上四种保存数据的方法
  10. android获取屏幕分辨率大小(DisplayMetri