2

My phpmyadmin used to load but with the following errors. Haven't found a solution for it yet. Please let me know what I can do, thanks for your time and help.

Now it loads a blank page.

I pressed on the sql option and passed the following command - set password for root@localhost = password('something');

And then I configured phpmyadmin config.inc.php file by replacing 'config' in front of 'auth_type' by 'cookie' and adding my password in the empty '' under it. And that's when my phpmyadmin started going blank. I added my password in the empty '' in front of 'controlpass' under pma after that. Didn't help. I changed it back to the default settings and it'still not working.

xampp Access denied for user 'pma'@'localhost' (using password: NO) xampp Access denied for user 'pma'@'localhost' (using password: NO)

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xamppxamppxamppxamppxamppxamppxampp';
/* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;
/*
 * First server
 */
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'bananashake';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$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';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';

/*
 * End of servers configuration
 */
?>
James Wong
  • 4,529
  • 4
  • 48
  • 65
Mad Yo
  • 29
  • 1
  • 1
  • 6
  • have you checked access permission for pma – Shibin Raju Mathew Jun 13 '18 at 04:53
  • Hello welcome to SO, can you post your phpMyAdmin `config.inc.php` – James Wong Jun 13 '18 at 05:08
  • I'm looking up on it but as you can see in the image, there is no privileges option in my main frame which is the first step of the solution suggested online. There is 'edit privileges' under User accounts and 'check privileges' under databases. Even then, the solution suggested online isn't seeming helpful. – Mad Yo Jun 13 '18 at 05:13
  • Yes James, however the config.inc.php is too long to post. Would you like me to remove the spaces and post it? Sorry I'm a noob here. – Mad Yo Jun 13 '18 at 05:16
  • @JamesWong How do I post it here? – Mad Yo Jun 13 '18 at 05:26
  • @MadYo Hi there, just edit your question and paste it at the bottom. You can use the code formatting and SO will collapse long codes into scrollable area. [Learn more about formatting...](https://stackoverflow.com/editing-help#comment-formatting) – James Wong Jun 13 '18 at 06:55
  • @MadYo quick question, have you installed MySQL before? is it a fresh xampp install? Make sure xampp can start MySQL service. The next step is to shell into mysql cli and flush the user table. – James Wong Jun 13 '18 at 14:51
  • @JamesWong Yes I have installed Mysql before and it works normally independently. I had to change the port for it on xampp for it to be able to start the service normally which it still does. Only the page doesn't load now. I ran the command from the Mysql client - flush privileges; and it returned 'Query OK, 0 rows affected (0.24 sec)'. phpmyadmin still didn't load. – Mad Yo Jun 13 '18 at 18:06

5 Answers5

9

Based on the latest information you posted in the comments, it seems phpMyAdmin is connecting to your pre-existing MySQL install. To connect to your XAMPP MySQL DB, revert the changes to the config. (that is, auth_type = 'config')

And add this line to your phpMyAdmin config.inc.php

$cfg['Servers'][$i]['port'] = '3306'; //Change 3306 to the port number of your XAMPP MySQL
James Wong
  • 4,529
  • 4
  • 48
  • 65
  • 2
    I did that, still didn't work. So I uninstalled and reinstalled xampp and now I'm back to the situation I first posted about yesterday (see image). For now I will work with it, however if you know how to fix that, please let me know. Thanks for your time and help over the past day. – Mad Yo Jun 14 '18 at 05:44
  • 1
    Update: I took care of the first problem in the image. Only the two errors show now. – Mad Yo Jun 14 '18 at 06:01
  • 1
    Did you ever find a solution? – Mawg says reinstate Monica Apr 22 '19 at 07:20
  • 1
    Thanks, I just changed my port to 3309 in config.inc.php file as given in MySQL my.ini file. Now it is working perfectly. – Irshad Khan Jun 23 '20 at 06:34
  • If changing port did not suffice, then ste the password of 'root' to empty: $cfg['Servers'][$i]['password'] = ''; – Haider Ali J Al-Rustem Feb 25 '21 at 17:56
2

This can happen after changing mysql port. In that case, just click the upper left icon Empty session data.

vladatr
  • 616
  • 6
  • 15
1

this error sometimes happen for me too. this time I tried another browser and it was working fine! ... so I cleared site data and it fixed. so before doing any other solutions try to clear site data first. hope it fix.

Amin Adel
  • 970
  • 3
  • 17
  • 33
0

This problem or error happen When I installed XAMPP in two different drive, After removing XAMPP in another drive and have only one XAMPP folder in my system , this error fixed for me

0

this is what i did to fix the same error. I initally had something runing on port 3306 which is what sql server uses when xampp is first installed. so i fix the port to 3307. which then fixed the port issue but not authentication. So i went into the config file of phpmyadmin and changed my user to

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

when i first installed mysql server, i had my user and password set to be the following above. so when xampp tries to access my sqlserver, it will want the same authentication or will not use it.

so pma user does not exsit unless you have created it.

masafood
  • 325
  • 2
  • 11