Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

root access denied trying to change information_schema

I am logged in as the root user to my MySQL database (Community version 5.6). I have global privileges as I can see by executing SHOW GRANTS;

GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY PASSWORD '*E5BDEE3EBCA26FB68C52549E9AD22869FCE94926' WITH GRANT OPTION

However, I am trying to change a variable in the information_schema database global_variables table and getting access denied for user root@% to database information_schema

How can I change this value in the global_variables table?

like image 459
John Avatar asked Oct 28 '25 08:10

John


1 Answers

information_schema is read-only by design. As you can read in the MySQL manual, you can't write in the table even if the user has permissions to do so.

You can change global variables by SQL query if the user has permissions:

SET GLOBAL <key> = <value>;
like image 197
Petr Hejda Avatar answered Oct 31 '25 01:10

Petr Hejda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!