XAMPP Connection for controluser as defined in your configuration failed phpmyadmin xampp
The mentioned error caused due to mis-configuration of your PHPMyadmin's configuration settings.
Check the user credentials mentioned in your PHPMyadmin's config.inc.php
file.
As you said you are using xampp on windows the path will be similar like below:
C:\xampp\phpMyAdmin\config.inc.php
In the above file check the below 2 lines (at around line #30):
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
Connection for controluser as defined in your configuration failed with phpMyAdmin in XAMPP
- Open phpMyAdmin in a browser and log in as root.
- Create a database called
phpmyadmin
- Create a user called
pma
and set the "host" to the hostname or IP address of your web server (if the web server and MySQL are on the same box uselocalhost
), make a note of the password, and grant the new user full control over thephpmyadmin
database. It is recommended that this user does not have access to anything other than this database. - Go to the phpMyAdmin installation directory, where you should find a sub-directory called
sql
. - In
sql
you will find a file calledcreate_tables.sql
. Open it in a text editor. - In phpMyAdmin, select the
phpmyadmin
database and click on the "SQL" tab. - Copy/paste the entire text from
create_tables.sql
into the text box, and run the query. Open the
config.inc.php
file in the phpMyAdmin install directory, and add the following lines (or change the existing settings if they are already there):$cfg['Servers'][1]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][1]['controluser'] = 'pma';
$cfg['Servers'][1]['controlpass'] = '<your password>';
// Note: The list below may grow as PMA evolves and more control tables are added
// Use your common sense! Don't just blindly copypasta, look at what it means!
$cfg['Servers'][1]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][1]['relation'] = 'pma_relation';
$cfg['Servers'][1]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][1]['table_info'] = 'pma_table_info';
$cfg['Servers'][1]['column_info'] = 'pma_column_info';
$cfg['Servers'][1]['history'] = 'pma_history';
$cfg['Servers'][1]['recent'] = 'pma_recent';
$cfg['Servers'][1]['table_uiprefs'] = 'pma_table_uiprefs';
$cfg['Servers'][1]['tracking'] = 'pma_tracking';
$cfg['Servers'][1]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][1]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][1]['designer_coords'] = 'pma_designer_coords';Save and close the file.
IMPORTANT - PMA loads the config on login, evaluates it and stores it into the session data so the message will not disappear until you do this:
- Log out of phpMyAdmin and log in again
Problem solved.
Connection for controluser as defined in your configuration failed
I have successfully connected by switching the protocol to tcp and connecting to '127.0.0.1' instead of 'localhost'.
Still cannot connect via Unix Socket though even though the MySql daemon socket is running.
Related Topics
How to Get Ruby Syntax Highlighting in PHPstorm
Export MySQL Database Using PHP
Yosemite/El Capitan PHP-Gd + Mcrypt Installation
PHP JSON Encode - Malformed Utf-8 Characters, Possibly Incorrectly Encoded
How to Put PHP Inside JavaScript
PHP Get Url of Redirect from Source Url
Laravel Model with Two Primary Keys Update
How to Do Error Logging in Codeigniter (Php)
Destroy or Unset Session When User Close the Browser Without Clicking on Logout
Mysql_Real_Escape_String VS Addslashes
How to Sort an Array of Utf-8 Strings
How to Access the PHP.Ini File in Godaddy Shared Hosting Linux
Run a MySQL Query as a Cron Job
Using PHP/Apache to Restrict Access to Static Files (Html, CSS, Img, etc)