简体   繁体   中英

phpmyadmin, mysql database parent?

I think I've searched so much for an answer that all the search results are now purple for the first 3 or 4 pages...

1) I can call all the individual names of the databases on my MySQL via a PHP script. I can connect, get the database names, and disconnect. No problem thanks to search results and a very small amount of common sense (small for you guys.)

2) I've figured out the basics of retrieving the size in bytes, Kb, Mb etc...

BUT, I cannot find any reference that will allow me to call the entire database as a "parent" or "root" folder (I hope that isn't too incorrect a term).

Is there a higher level folder hierarchy other than the pre-established DB's on the phpmyadmin dashboard? (I have XAMPP installed, and using that as my sandbox)

$dbhostname = "localhost";
$db = "cdcol";
$dbusername = "root";
$dbpassword = "**********";

The $db = ""; variable is the database I'm querying.

Quite honestly, it's only for sport. I'm trying to figure out some basic PHP stuff and the idea to do this popped into my head. I'm only a week into PHP after an AVERAGE amount of knowledge of HTML/CSS.

Thanks, Stack.

So, to expand the comment into more meaningful answer. There exists no concept of a "parent" database. However, there are 3 databases that exist for internal use and statistics. Those are:

You're not supposed to alter those databases or tables. They exist for information purposes and for MySQL's internal use. Generally, when using MySQL, it's ideal to create a user account which is allowed to handle one database - or more of them, but not the mentioned three (so if the user account gets compromised, the potential attacker would not be able to bring the entire server down). I hope it helps and have fun playing with the stack :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM