• 企业400电话
  • 网络优化推广
  • AI电话机器人
  • 呼叫中心
  • 全 部 栏 目

    网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    mysql server is running with the --skip-grant-tables option
    POST TIME:2021-10-18 21:08

    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) 

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

    您可能感兴趣的文章:
    • The MySQL server is running with the --read-only option so it cannot execute this statement
    • mysql数据库mysql: [ERROR] unknown option ''--skip-grant-tables''
    • mysql视图之确保视图的一致性(with check option)操作详解
    • MySQL存储表情时报错:java.sql.SQLException: Incorrect string value:‘\xF0\x9F\x92\xA9\x0D\x0A...’的解决方法
    • Mysql中的NULL和Empty String
    • javascript连接mysql与php通过odbc连接任意数据库的实例
    • ubuntu下apt-get安装和彻底卸载mysql详解
    • MySQL利用AES_ENCRYPT()与AES_DECRYPT()加解密的正确方法示例
    • 利用pt-heartbeat监控MySQL的复制延迟详解
    • MySQL pt-slave-restart工具的使用简介
    上一篇:Mysql 5.7.19 winx64 ZIP Archive 安装及使用过程问题小结
    下一篇:mysql5.7.17.msi安装图文教程
  • 相关文章
  • 

    关于我们 | 付款方式 | 荣誉资质 | 业务提交 | 代理合作


    © 2016-2020 巨人网络通讯

    时间:9:00-21:00 (节假日不休)

    地址:江苏信息产业基地11号楼四层

    《增值电信业务经营许可证》 苏B2-20120278

    X

    截屏,微信识别二维码

    微信号:veteran88

    (点击微信号复制,添加好友)

     打开微信