phpMyAdmin access remote database
Edit config.inc.php
Find config.inc.php, edit and add
A. Access URL
<code><span>$cfg</span>[<span>'PmaAbsoluteUri'</span>] = <span>''</span>;这里填写phpmyadmin的访问网址 </code>
B.mysql host information
<code>$cfg[<span>'Servers'</span>][<span>$i</span>][<span>'host'</span>] = 'localhost'; // MySQL hostname or IP address 填写localhost或mysql所在服务器的ip地址,如果mysql和该phpmyadmin在同一服务器,则按默认localhost $cfg[<span>'Servers'</span>][<span>$i</span>][<span>'port'</span>] = ''; // MySQL port - leave blank for default port </code>
mysql port, if it is the default 3306, just leave it blank
C.mysql username and password
<code>$cfg[<span>'Servers'</span>][<span>$i</span>][<span>'user'</span>] = 'root'; // MySQL user 访问phpmyadmin使用的mysql用户名 fg[<span>'Servers'</span>][<span>$i</span>][<span>'password'</span>] = ''; // MySQL password (only needed对应上述mysql用户名的密码 </code>
D.Authentication method
$cfg['Servers'][$i]['auth_type'] = 'cookie';
There are four modes to choose from here, cookie, http, HTTP, config
The config method is to enter the access URL of phpmyadmin to enter directly without entering the user name and password. It is unsafe and not recommended.
When this item is set to cookie, http or HTTP, logging in to phpmyadmin requires a data username and password for verification, as follows:
The PHP installation mode is Apache, and http and cookies can be used;
PHP installation mode is CGI, you can use cookies
E. Setting of phrase password (blowfish_secret)
Quote: $cfg['blowfish_secret'] = '';
If the authentication method is set to cookie, you need to set a phrase password. It is up to you to decide what password to set, but it cannot be left blank, otherwise an error will be prompted when logging in to phpmyadmin
The above has introduced 179 php phpMyAdmin to access the remote database, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.