Is structure of phpmyadmin database correct?

Ryan Schmidt ryandesign at macports.org
Sun Feb 15 00:01:27 PST 2015


On Feb 14, 2015, at 11:15 AM, Murray Eisenberg wrote:

> I used the procedure at https://trac.macports.org/wiki/howto/PHP to enable pmadb for phpmyadmin. The structure of database phpmyadmin so created is as follows:
> 
>   phpmyadmin
>       pma
>           pma__bookmark
>           pma__central_columns
>           :
>           :
>           pma__users
> 
> Is that correct, that the individual tables pma__bookmark, etc. should not be directly under phpmyadmin but instead under pma under phpmyadmin?
> 
> (Is that what the use of the double-underscore in the table names forces?)

Yes, the use of double-underscore is what causes a sub-section to appear in phpMyAdmin. If for example you are using a shared hosting account with a limited number of databases, but you want to host more sites than that, you name your tables with a prefix for each site. Let's say you have a single MySQL database, and you want to host two sites, and also use phpMyAdmin to manage them. Then you might have these tables in the database:

pma__bookmark
pma__central_columns
site1__privileges
site1__users
site2__privileges
site2__users

And when viewed in phpMyAdmin you would see:

database1
  pma
    bookmark
    central_columns
  site1
    privileges
    users
  site2
    privileges
    users

You can change this separator from double-underscore to something else if you prefer:

https://docs.phpmyadmin.net/en/latest/config.html#cfg_NavigationTreeTableSeparator




More information about the macports-users mailing list