Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql root permission to update information_schema error

when i try to update one table(GLOBAL_VARIABLES) from information_schema db,

i get an error :

Access denied for user 'root'@'localhost' to database 'information_schema'

Although I am root user with all privileges ,

how can i fix permission. ?

or how can i update this table ?

thanks.

like image 473
Haim Evgi Avatar asked Aug 09 '10 08:08

Haim Evgi


People also ask

Can you update INFORMATION_SCHEMA?

Information_Schema are views and read-only. Yo can not update meta data about tables, only by modifying actual table with ALTER TABLE . If you do an ALTER TABLE you will have current timestamp in meta data.

Can I drop INFORMATION_SCHEMA?

Whenever you access phpMyAdmin for one of your databases, you will also see a database named - information_schema: It is created by default and allows you to retrieve metadata about the objects within a database. As it's crucial to have this database intact, there is no way of deleting or editing it.

What is Information_schema database?

INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a database or table, the data type of a column, or access privileges. Other terms that are sometimes used for this information are data dictionary and system catalog.

How do I update MySQL privileges?

You can't currently change a user's privileges in the control panel, so to do so you need to use a command-line MySQL client like mysql . After you create a user in the cluster, connect to the cluster as doadmin or another admin user.


2 Answers

You can change the global variables using SET, and read them using SHOW.

See http://dev.mysql.com/doc/refman/5.0/en/using-system-variables.html for more info

like image 139
Per-Frode Pedersen Avatar answered Oct 14 '22 11:10

Per-Frode Pedersen


The INFORMATION_SCHEMA database is a "pseudo database" containing server-generated views and as far as I know, contains only read-only data. If you need to alter a variable, you need to go the standard way, see Per's answer. From the mySQL manual:

INFORMATION_SCHEMA is the information database, the place that stores information about all the other databases that the MySQL server maintains. Inside INFORMATION_SCHEMA there are several read-only tables. They are actually views, not base tables, so there are no files associated with them.

More detailed info on GLOBAL_VARIABLES here.

like image 31
Pekka Avatar answered Oct 14 '22 10:10

Pekka