Basically, I have a problem with my config.inc.php file. But I'll describe the sequence of events in case I've mangled something else that I'm not aware of.
I've built a database in phpMyAdmin which I've been using for a few months on localhost. It was installed with XAMPP. It's phpMyAdmin Version 3.5.7
, according to the XAMPP/xamppfiles/phpMyAdmin/README
file.
For awhile, I had left ['controluser'] = 'pma' and ['controluserpass'] = 'pmapass'
. A few weeks ago, I changed those values, but that apparently created a problem, since phpMyAdmin started showing me the
"Connection for controluser as defined in your configuration failed"
warnings all the time. Nevertheless, I was still able to do everything I needed to do; so I kept using my database.
Yesterday I had to kill a query that had gone on for over 8 hours. After that, phpMyAdmin seemed to be loading other databases and tables a bit slow. So I opened XAMPP and pressed the stop button for MySQL. Evidently, this button no longer stops MySQL for me. The icon simply spins and spins as if thinking. So, as of today, I've been stopping and starting MySQL directly from the terminal rather than through the XAMPP Control interface.
Since I was seeing warnings for the controluser, I decided to rewrite the config.inc.php file to cure whatever problem was there. Unfortunately, I've only made things worse. Now I can't access my database at all.
I've spent 5 hours today researching how to set up my config.inc.php file, but I'm still unable to access my database. In the past, I had it set up with the 'config' option and never had to enter a password. Ideally I'd prefer to have password security. But at this stage, I'd be happy just to regain access to my database.
Right now, localhost/phpmyadmin
goes to the login page, where it defaults to having "root" entered for "username". But I can't seem to log in. Depending on the adjustments I've made to config.inc.php, sometimes the "username" defaults to gibberish; and other times an error message appears instead of the login. No matter what I enter for the password, phpMyAdmin won't accept it:
2002 Cannot log in to the MySQL server
Other times, I get this error:
2002 - Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (2) The server is not responding (or the local server's socket is not correctly configured).
I've tried switching back and forth between
$cfg['Servers'][$i]['auth_type'] = 'cookie'
and
$cfg['Servers'][$i]['auth_type'] = 'config'
and between
$cfg['Servers'][$i]['connect_type'] = 'tcp'
and
$cfg['Servers'][$i]['connect_type'] = 'socket'
and between
$cfg['Servers'][$i]['AllowNoPassword'] = false
and
$cfg['Servers'][$i]['AllowNoPassword'] = true
and between
$cfg['Servers'][$i]['host'] = 'localhost'
and
$cfg['Servers'][$i]['host'] = '127.0.0.1'
Nothing seems to allow to access my database.
At the moment, I'm getting the login screen and this error:
2002 Cannot log in to the MySQL server
What should I change? Below is my config.inc.php file:
<?php
$cfg['blowfish_secret'] = '89x7a3f';
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['AllowRoot'] = true;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = true;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'pass';
// $cfg['Servers'][$i]['controlhost'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
$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['DefaultConnectionCollation'] = 'utf8_general_ci';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['DefaultLang'] = 'en';
?>