Sierra Kilo
Sierra Kilo

Reputation: 275

MySQL - How to organize databases into folders

Is it possible to organize these so they don't all show up in one list like this?

Thanks

mysql> show databases;
+---------------------+
| Database            |
+---------------------+
| All databases list  |
+---------------------+

Upvotes: 1

Views: 524

Answers (2)

The Impaler
The Impaler

Reputation: 48750

No, it's not possible to have "catalogs" in MySQL. SQL Server and Sybase implement those, but not MySQL.

Having said that, you still can run multiple instances of MySQL on the same box.

Each one will:

  • Save the data into a different [internal] directory.
  • Will listen on a different network port.
  • Will have a separate security (users, permissions).
  • Could be the same or different version of MySQL.

Upvotes: 2

Marcello Grechi Lins
Marcello Grechi Lins

Reputation: 3410

No, all MySQL databases created will show up, as long as you have access to view (read) them.

Your best bet to filter out a sub-set of databases is to use a like statement such as:

show databases like 'projectA%'

(Source: https://dev.mysql.com/doc/refman/8.0/en/show-databases.html)

Upvotes: 2

Related Questions