简体   繁体   English

phpmyadmin,mysql数据库的父级?

[英]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. 1)我可以通过PHP脚本在MySQL上调用数据库的所有单独名称。 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... 2)我已经弄清了以字节,Kb,Mb等为单位检索大小的基础...

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? 除了phpmyadmin仪表板上的预先建立的数据库之外,是否还有更高级别的文件夹层次结构? (I have XAMPP installed, and using that as my sandbox) (我已安装XAMPP,并将其用作我的沙箱)

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

The $db = ""; $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. 我试图弄清楚一些基本的PHP东西,而实现这个想法的想法浮现在脑海。 I'm only a week into PHP after an AVERAGE amount of knowledge of HTML/CSS. 我对HTML / CSS的平均了解程度仅为PHP的一个星期。

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. 但是,存在3个数据库供内部使用和统计。 Those are: 那些是:

You're not supposed to alter those databases or tables. 您不应该更改那些数据库或表。 They exist for information purposes and for MySQL's internal use. 它们存在的目的是为了提供信息并供MySQL内部使用。 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). 通常,使用MySQL时,理想的情况是创建一个允许处理一个数据库的用户帐户-或多个数据库,但不能处理上述三个数据库(因此,如果该用户帐户受到威胁,则潜在的攻击者将无法使用该帐户。整个服务器停机)。 I hope it helps and have fun playing with the stack :) 我希望它能对您有所帮助,并乐在其中:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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