I have one database in mysql.
But when i log into phpMyAdmin , it shows another database called information_schema.
Is that database always present with one database?
I mean to say is there a copy of information_schema for every database present in mysql or is there one database called inforemation_schema per mysql server?
If i modify this information_schema database how will that affect my current database?
You can think of information_schema as a “master database” that holds details about all the other databases on the server such as the names and types of tables, columns and users.
What is information_schema?
From the reference documentation:
What is stored in information_schema?
You can see the kinds of things stored in information_schema, and the way in which they are organised, by viewing this diagram (for MySQL 5.0) or this diagram (for MySQL 5.1).
What happens if I modify information_schema?
In reality, information_schema is a collection of read-only views. As such, it should be impossible to modify it and do any damage. However, the MySQL FAQ on this topic has this to say:
This implies that if you do find yourself able to modify information_schema (which should be impossible, and is in MySQL, but other vendor implementations of SQL might allow it) you should at the very least choose not to. If you could damage/modify information_schema you’d be damaging the actual structure (e.g. table names, column types) of your other databases.
Does every user have their own copy of information_schema?
Each user can see information_schema that pertains to the tables and databases they have access to. Some users with heavily limited rights will still see information_schema but will see only NULL values for any information_schema queries. However, it is important to remember that information_schema is not an actual database, but simply a convenient way SQL provides so that you can select information about your database(s) and table(s).
From the reference documentation:
Where can I find more information?