加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

Mysql学习mysql server is running with the --skip-grant-table

发布时间:2020-12-12 00:51:08 所属栏目:MySql教程 来源:网络整理
导读:《Mysql学习mysql server is running with the --skip-grant-tables option》要点: 本文介绍了Mysql学习mysql server is running with the --skip-grant-tables option,希望对您有用。如果有疑问,可以联系我们。 MYSQL学习 The MySQL server is running w

《Mysql学习mysql server is running with the --skip-grant-tables option》要点:
本文介绍了Mysql学习mysql server is running with the --skip-grant-tables option,希望对您有用。如果有疑问,可以联系我们。

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

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

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

MYSQL学习第二种:

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

MYSQL学习解决办法:

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

MYSQL学习flush privileges;

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

MYSQL学习flush privileges;

MYSQL学习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学习mysql> SET SESSION binlog_format = 'ROW';
mysql> SET GLOBAL binlog_format = 'ROW';

MYSQL学习解释:

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

MYSQL学习
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) 

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读