mysql server is running with the --skip-grant-tables option

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 --skip-grant-tables mode. How can I get it back to the original mode?

The first method: Skip-grant-tables is configured in the mysql.ini file. Just add a # in front of it and comment it out.

Modify the mysql configuration file, remove skip-grant-tables , and restart mysql

Second type:

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

Solution:

mysql> set global read_only=0;
(Turn off 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';

explain:

set global read_only=0; turn off read-only, can read and 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; turn off read-only, can read and write set global read_only=1; start read-only mode

You may also be interested in:
  • The MySQL server is running with the --read-only option so it cannot execute this statement
  • mysql databasemysql: [ERROR] unknown option ''--skip-grant-tables''
  • Detailed explanation of ensuring the consistency of MySQL views (with check option)
  • Solution to the error message "java.sql.SQLException: Incorrect string value:'\xF0\x9F\x92\xA9\x0D\x0A...'" when storing emoticons in MySQL
  • NULL and Empty String in Mysql
  • An example of connecting mysql with php via odbc to any database
  • Detailed explanation of installing and completely uninstalling mysql with apt-get under Ubuntu
  • Examples of the correct way to use AES_ENCRYPT() and AES_DECRYPT() to encrypt and decrypt MySQL
  • Detailed explanation of using pt-heartbeat to monitor MySQL replication delay
  • Introduction to the use of MySQL pt-slave-restart tool

<<:  How to use cutecom for serial communication in Ubuntu virtual machine

>>:  Vue3.0 routing automatic import method example

Recommend

vue-cropper component realizes image cutting and uploading

This article shares the specific code of the vue-...

js to achieve simple product screening function

This article example shares the specific code of ...

Steps to enable MySQL database monitoring binlog

Preface We often need to do something based on so...

The latest version of MySQL5.7.19 decompression version installation guide

MySQL version: MySQL Community Edition (GPL) ----...

The latest virtual machine VMware 14 installation tutorial

First, I will give you the VMware 14 activation c...

Steps to create your own YUM repository

To put it simply, the IP of the virtual machine u...

MySQL 8.0.12 Simple Installation Tutorial

This article shares the installation tutorial of ...

Detailed explanation of Vue configuration request multiple server solutions

1. Solution 1.1 Describing the interface context-...

Nginx stream configuration proxy (Nginx TCP/UDP load balancing)

Prelude We all know that nginx is an excellent re...

Vue implements QR code scanning function (with style)

need: Use vue to realize QR code scanning; Plugin...

Using JavaScript in HTML

The <script> tag In HTML5, script has the f...

Detailed explanation of MySQL remote connection permission

1. Log in to MySQL database mysql -u root -p View...