12

Right now I have a database in phpMyAdmin, and off the the side of the screen, it shows the database name, and a list of tables inside the database. It's fine if it's only a couple of tables, but when there's dozens of tables, it gets hard to find the tables I want to edit. I've thought about creating another database to make it easier to organize, but then I'll have to connect using the different database's name and a different user login for the database, and I just thought how much easier would it be if I can make folders or something similar inside the database I already have to organize my tables. I'm wondering if something like this is possible, or anyone know any work-around this issue.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
Skillet
  • 217
  • 1
  • 4
  • 15

1 Answers1

36

Well, you can't create a database (or folders) within a database; that's just not something MySQL is able to do.

phpMyAdmin has a grouping feature that may help your situation. By default, databases with a prefix followed by _ (a single underscore) will be grouped together, as will tables with __ (two underscores).

Here's an example of how this ends up looking when grouped:

Database:

enter image description here

Table:

enter image description here

If you're able to rename some of your tables, you'll be able to take advantage of the grouping feature to make the phpMyAdmin display a bit more manageable. Of course, this won't change the way other tools display the table list.

The configuration directives $cfg['NavigationTreeDbSeparator'] and $cfg['NavigationTreeTableSeparator'] control the separator used. The relevant documentation starts at http://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeEnableGrouping and includes the next few line items.

Isaac Bennetch
  • 10,266
  • 2
  • 27
  • 38
  • 1
    Anything similar to sorting the tables? Instead of the default alphabetical order? – Mark Messa Jun 20 '18 at 16:54
  • The equivalent of using $cfg['NavigationTreeDbSeparator'] but at the table level is $cfg['NavigationTreeTableSeparator'], but there's no way to change the sort order away from alphabetical. – Isaac Bennetch Jun 23 '18 at 12:34