Difference Between Schema / Database in MySQL

Viewed 247058

Is there a difference between a schema and a database in MySQL? In SQL Server, a database is a higher level container in relation to a schema.

I read that Create Schema and Create Database do essentially the same thing in MySQL, which leads me to believe that schemas and databases are different words for the same objects.

10 Answers

Simply if you are thinking or discussing about Mysql. Then take a simple answer

"SCHEMA & DATABASE are exactly the same thing, just a synthetic sugar in mysql."

Just add some more info:

MongoDB also distinguish schema from database.

schema represent the tables, which means the structure of database.

not like Postgres, SQL server schema is set of database have same thing but in mysql schema and database it is the same MySQL does not support the concept of schema. In MySQL, schema and schemas are synonyms for database and databases.

When a user connects to MySQL, they don't connect to a specific database. Instead, they can access any table they have permissions for

Related