Why am I seeing “ERROR 1290 (HY000): The MySQL server is running with the –read-only option so it cannot execute this statement”?

Why am I seeing “ERROR 1290 (HY000): The MySQL server is running with the –read-only option so it cannot execute this statement”? If I look in the “ps” output, the mysqld server is NOT running with the –read-only option!

The mysql “root” user can write to the database, but other users only have read-only access, and they see the error “ERROR 1290 (HY000): The MySQL server is running with the –read-only option so it cannot execute this statement”:

mysql> CREATE TABLE test_table (x INTEGER);
ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
mysql>

Look for “read-only = 1” in the /etc/my.cnf file:

[mysqld]
read-only                      = 0

If it’s set to one, then set it to 0 instead, and restart MySQL:

[root@dbserver ~]# /sbin/service mysqld stop
Stopping mysqld:                                           [  OK  ]
[root@dbserver ~]# /sbin/service mysqld start
Starting mysqld:                                           [  OK  ]
[root@dbserver ~]#
Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon