This method is not safe and has not been verified. Anyone can go to phpmyadmin to manage the database. Return to the configuration file and find the following code:
If you change the config of the above code to cookie or http, the verification interface will appear (the verification interface for cookie and http is different on windows). I changed it to cookie, the image verification page is displayed.
2. This method also modifies the phpmyadmin configuration file, but the path is different. Find the config. default. Php file in phpmyadmin/libraries, which contains various server configuration parameters.
Find this line of code. In line 132, the port is configured. If the value is null, the default value is 3306. Change the value to 3307, save the code, and restart apache, you can also access phpmyadmin.
II. phpmyadmin configuration file details
Open phpmyadmin/libraries and find the config. default. Php file. The common parameter configuration is as follows:
The code is as follows: |
Copy code |
$ Cfg ['pmaabsoluteuri '] = ''; // phpmyadmin access URL, which is the default value. $ Cfg ['translationwarningthreshold '] = 80; // server port $ Cfg ['servers'] [$ I] ['host'] = 'localhost'; // ip address of the mysql host. If mysql and phpmyadmin are on the same server, press the default localhost $ Cfg ['servers'] [$ I] ['port'] = '000000'; // mysql port. The default value is 3307. Leave it blank. $ Cfg ['servers'] [$ I] ['user'] = 'root'; // mysql username $ Cfg ['servers'] [$ I] ['password'] = ''; // password $ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker'; // authentication method /* You can configure the port, user name, and authentication method in config. inc. php with a high priority. * $ Cfg ['servers'] [$ I] ['auth _ type'] = 'config'; this is in config. inc. php * Configuration. If this value is not modified, you can still directly access phpmyadmin. */ $ Cfg ['defaultlang '] = 'zh'; // set the default language |
The authentication method $ cfg ['servers'] [$ I] ['auth _ type'] = 'cooker'; has four values: cookie, http, HTTP, config
In config mode, you can directly access the phpmyadmin access url without entering the user name and password. It is insecure and is not recommended.
When this option is set to cookie, http, or HTTP, you need to verify the data username and password to log on to phpmyadmin. The details are as follows:
The PHP installation mode is Apache, and http and cookie can be used;
The PHP installation mode is CGI. You can use cookies.
In cookie mode, you can also set $ cfg ['blowfish _ secret'] = "; (phrase password). You have to decide why to set the password, or ignore it. (I have never tested it. This is from the instructions in this document. I don't think it's enough to ignore it)