XAMPP (Apache+mysql+php+perl) is a powerful building XAMPP software station integration package, lightweight, easy to use. It provides a powerful phpMyAdmin database management tool that allows users to use and manage the database. For issues where phpMyAdmin cannot be opened locally, my solution is as follows:
MySQL has a default dedicated port: 3306, so if you have previously installed MySQL independently, then 3306 ports have been occupied. Install XAMPP integrated MySQL, you must set up a separate port, otherwise you can not access phpMyAdmin, I received the error message see figure:
Modify the method is also very convenient, open XAMPP Control Panel, find MySQL right config, click, will appear My.ini selection, this is the MySQL configuration file, as shown:
Of course just modify the port, I still can not access. There are two ways to modify the phpMyAdmin configuration file:
First, access to phpMyAdmin error solutions
1, open the XAMPP directory (the default installation directory, if modified, please find XAMPP installation directory), open the phpMyAdmin directory, found in the directory config.inc.php, my default configuration:
Copy Code code as follows:
<?php
/*
* This are needed for cookies based authentication to encrypt password in
* Cookies
*/
$cfg [' blowfish_secret '] = ' xampp '; /* You SHOULD the change is A more SECURE COOKIE auth! */
/*
* Servers Configuration
*/
$i = 0;
/*
* I server
*/
$i + +;
/* Authentication type and Info * *
$cfg [' Servers '] [$i] [' auth_type '] = ' config ';
$cfg [' Servers '] [$i] [' user '] = ' username '; MySQL User name
$cfg [' Servers '] [$i] [' password '] = ' password '; MySQL Password
$cfg [' Servers '] [$i] [' extension '] = ' mysqli '; Extended configuration, if the access appears not configured mysqli error, plus this. Default is some
$cfg [' Servers '] [$i] [' allownopassword '] = true;
$cfg [' Lang '] = ';
/* Bind to the localhost IPv4 address and TCP */
$cfg [' Servers '] [$i] [' host '] = ' 127.0.0.1 ';
$cfg [' Servers '] [$i] [' connect_type '] = ' TCP ';
/* User for Advanced features * *
$cfg [' Servers '] [$i] [' controluser '] = ' PMA ';
$cfg [' Servers '] [$i] [' controlpass '] = ';
/* Advanced phpMyAdmin Features * *
$cfg [' Servers '] [$i] [' pmadb '] = ' phpmyadmin ';
$cfg [' Servers '] [$i] [' bookmarktable '] = ' pma_bookmark ';
$cfg [' Servers '] [$i] [' relation '] = ' pma_relation ';
$cfg [' Servers '] [$i] [' table_info '] = ' pma_table_info ';
$cfg [' Servers '] [$i] [' table_coords '] = ' pma_table_coords ';
$cfg [' Servers '] [$i] [' pdf_pages '] = ' pma_pdf_pages ';
$cfg [' Servers '] [$i] [' column_info '] = ' pma_column_info ';
$cfg [' Servers '] [$i] [' history '] = ' pma_history ';
$cfg [' Servers '] [$i] [' designer_coords '] = ' pma_designer_coords ';
$cfg [' Servers '] [$i] [' tracking '] = ' pma_tracking ';
$cfg [' Servers '] [$i] [' userconfig '] = ' pma_userconfig ';
$cfg [' Servers '] [$i] [' recent '] = ' pma_recent ';
$cfg [' Servers '] [$i] [' table_uiprefs '] = ' pma_table_uiprefs ';
/*
* End of servers configuration
*/
?>
Then add the following code after $cfg[' Lang ' = ':
Copy Code code as follows:
$cfg [' Servers '] [$i] [' port '] = ' 3307 '
Save, restart Apache, enter localhost/phpmyadmin in the Address bar, you can go directly to the phpMyAdmin management interface
This way is not very safe, no verification, who can access the phpMyAdmin management database. Return to the configuration file and locate the following code:
Copy Code code as follows:
$cfg [' Servers '] [$i] [' auth_type '] = ' config '
If you change the code's config to a cookie, or HTTP, the validation interface appears (the cookie and HTTP corresponding authentication interface is different on Windows), and I change it to a cookie, which appears as a graphical verification interface.
2, this way is also modified phpMyAdmin configuration file, but the path is not the same, in Phpmyadmin/libraries find config.default.php file, which contains a variety of server configuration parameters.
Copy Code code as follows:
$cfg [' Servers '] [$i] [' port '] = ';
Find this line of code, my 132 line, this is configured port, the value is null is the default of 3306, to change its value to 3307, save, restart Apache, also can access the phpMyAdmin
Second, phpmyadmin configuration file detailed
Open the config.default.php file found in phpmyadmin/libraries, the common parameters are configured as follows:
Copy Code code as follows:
$cfg [' pmaabsoluteuri '] = '; phpMyAdmin access URL, default on the line
$cfg [' translationwarningthreshold '] = 80; Server port
$cfg [' Servers '] [$i] [' host '] = ' localhost ';//mysql host IP, if MySQL and the phpMyAdmin are on the same server, press default localhost
$cfg [' Servers '] [$i] [' port '] = ' 3307 '; MySQL port, default 3306, leave blank
$cfg [' Servers '] [$i] [' user '] = ' root '; MySQL User name
$cfg [' Servers '] [$i] [' password '] = ';//password
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; Authentication method
/* ports, user names, authentication methods can also be configured in config.inc.php, and high priority
* $cfg [' Servers '] [$i] [' auth_type '] = ' config '; This one's in config.inc.php.
* Configuration, if you do not modify this value, you can still directly access the phpMyAdmin
*/
$cfg [' Defaultlang ']= ' en '; Set the default language
For authentication Mode $cfg[' Servers ' [$i] [' auth_type '] = ' cookie '; Has a value of four: Cookie,http,http,config
Config mode is to enter the phpMyAdmin access URL can be directly entered, without entering a username and password, is not safe, do not recommend use.
When the entry is set to Cookie,http or HTTP, the login phpMyAdmin requires a data username and password to authenticate, as follows:
PHP installation mode is Apache, you can use HTTP and cookies;
The PHP installation mode is CGI and you can use cookies.
In addition, in cookie mode, you can also set $cfg[' blowfish_secret ' = '; (phrase password), as for setting up why the password, it is up to you to decide, also can not ignore. (not tested, this comes from the documentation, I think it's okay to ignore it)