捷忠物流王生 發表於 2023-10-10 00:00:00

虚拟主机中phpMyAdmin的安装配置方法

<p>&nbsp; &nbsp;
        首先下载可以从它的官方站点 http://www.phpmyadmin.net/ 中下载。站点上提供了不同的程序压缩方式供我们下载,这里我选择 bzip2 方式的来下载(因为这种文件体积小些,下其它格式的也可以)。</p><p>&nbsp; &nbsp;
        下面我们开始对phpmyadmin进行设置。</p><p>&nbsp; &nbsp;
        解压后得到一个目录,进入相关目录,打开 config.inc.php 文件,</p><p>&nbsp; &nbsp;
        找到 $cfg[&#39;PmaAbsoluteUri&#39;]</p><p>&nbsp; &nbsp;
        修改你将上传到空间的phpMyAdmin的网址</p><p>&nbsp; &nbsp;
        如:$cfg[&#39;PmaAbsoluteUri&#39;] = &#39;http://你的站点/phpmyadmin/&#39;;</p><p>&nbsp; &nbsp;
        还有下面的</p><p>&nbsp; &nbsp;
        $cfg[&#39;Servers&#39;][$i][&#39;host&#39;] = &#39;localhost&#39;;(通常用默认,也有例外)</p><p>&nbsp; &nbsp;
        $cfg[&#39;Servers&#39;][$i][&#39;auth_type&#39;] = &#39;cookie&#39;; // Authentication method (config, http or cookie based)?</p><p>&nbsp; &nbsp;
        在自己的机子里调试用config,如果在网上用cookie。因为是虚拟主机所以这里我们可以选择cookie</p><p>&nbsp; &nbsp;
        $cfg[&#39;Servers&#39;][$i][&#39;user&#39;] = &#39;root&#39;; // MySQL user(用户名,自己机里用root,在网上设你的mysql用户名)</p><p>&nbsp; &nbsp;
        $cfg[&#39;Servers&#39;][$i][&#39;password&#39;] = &#39;&#39;; // MySQL password (only needed</p><p>&nbsp; &nbsp;
        自己机里不用设</p><p>&nbsp; &nbsp;
        $cfg[&#39;Servers&#39;][$i][&#39;only_db&#39;] = &#39;&#39;; // If set to a db-name, only(你只有一个数据就设置一下)</p><p>&nbsp; &nbsp;
        注:$cfg[&#39;blowfish_secret&#39;] = &#39;&#39;;</p><p>&nbsp; &nbsp;
        本机的话不需要设置,但是网络的话需要设置成cookie:</p><p>&nbsp; &nbsp;
        $cfg[&#39;blowfish_secret&#39;] = &#39;cookie&#39;;</p><p>&nbsp; &nbsp;
        设置完毕可以上传到网上了。</p><p>&nbsp; &nbsp;
        浏览http://你的站点/phpmyadmin/ 当然你设置不同就用那个网址。</p><p>&nbsp; &nbsp;
        如果设置$cfg[&#39;Servers&#39;][$i][&#39;auth_type&#39;] = &#39;cookie&#39;; 所以显示会要求输入帐号密码,这里的帐号和密码你在提供商获得的mysql数据库的帐号、密码.</p>
頁: [1]
查看完整版本: 虚拟主机中phpMyAdmin的安装配置方法