Ever wondered why there is a “test” database in the list of tables when you install MySQL.

This is to allow users to practice MySQL commands or execute complex queries on the database.

“test” database is accessible to everyone who has access to MySQL in your localhost and hence is not advisable if you were to use it for your development.

Instead, create a database with specific user privileges if you have user rights or request your administrator to create one for you.

A simple MySQL statement to create a user with all privileges to the database.

$ grant all on newdb.* to ‘newdbuser’@localhost identified by ‘newdbuser_password’;