Mysql server is running with the -- skip-grant-tables option,

Source: Internet
Author: User

Mysql server is running with the -- skip-grant-tables option,

The MySQL server is running with the -- skip-grant-tables option so it cannot execute this statement
It seems that MYSQL is still running in the -- skip-grant-tables mode. How can I bring MYSQL back to the original mode?

Method 1: skip-grant-tables was originally configured in the mysql. ini file, followed by # comment out.

Modify the mysql configuration fileskip-grant-tablesAfter removal, restart mysql

Second:

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

Solution:

Mysql> set global read_only = 0;
(Disable the read-only attribute of the new master database)

Flush privileges;

Set global read_only = 1; (read/write attribute)

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 ';

Explanation:

Set global read_only = 0; Disable read-only and read/write
Set global read_only = 1; Start read-only mode

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; Disable read-only and can read and write set global read_only = 1; Start read-only mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.