Asked  5 Months ago    Answers:  5   Viewed   115 times

I keep getting the following errors with mysql connection through XAMPP and I don't know what to do:

enter image description here

That's the code in the

 * This is needed for cookie based authentication to encrypt password in
 * cookie
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE 

 * Servers configuration
$i = 0;

* First server

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

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '';
$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


I've already reset the password from MySql from the command line two times and added the changes to this code above and to the php.ini file, but at each time it goes back to the error. Any help?



yo need create the user "pma" in mysql or change this lines(user and password for mysql):

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma'; 
$cfg['Servers'][$i]['controlpass'] = '';

Linux: /etc/phpmyadmin/

Tuesday, July 13, 2021
answered 5 Months ago

So as you are telling that your are just started with php using ubuntu my advise is to start from scratch, here it's a small guite:

  • Install all you will be needing:

    sudo apt-get install apache2 php5 mysql-server phpmyadmin

  • Once all it's installed you will be using the following directories

    /var/www -- here its where your server stores your pages

    /var/log/apache2/ -- here it's where logs are stored (quite helpful when apache fails,check out the error.log file in that directory)

    /etc/apache2 -- apache configuration lives here

    /etc/php5/cli -- this is where configuration for php5 console live (when you use ~$ php5 test.php the configuration is read from here)

    /etc/php5/apache2 this is where configuration for php5 server live (when you access from a browser like http://localhost/test.php )

The configuration files out of the box dont need to be modified (maybe for more advance uses you will need to modify them)

To uninstall xamp here its a thread might be helful: . First remove xamp and then follow my instructions

Wednesday, March 31, 2021
answered 9 Months ago

If you are using the Bitnami version of Xampp you will have issues with Windows 10. Download and install an older version from and it should work. I used version 1.7.3 and so far so good.

Saturday, May 29, 2021
answered 7 Months ago

You're at risk of MySQL injections. Never insert data directly to a database without some sort of projection first. It's a major security risk. Also use mysqli_real_escape_string instead, and note that your $_POST[webSite] is unprotected.

Also, your error means that your database details are not correct.

Monday, August 23, 2021
answered 4 Months ago

First of, I can't imagine the reason why you've deleted root user. But back to the question - you should specify WITH GRANT OPTION, like this:

(However this should be opted after you get the mysql re-installed as if you don't have the root access and the user is not having the sufficient privileges also, then the best is to restart the install process and make the user and grant them privileges the way defined below)

mysql> create user 'golden'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on *.* to golden@localhost with grant option;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

and then

mysql> select current_user();
| current_user()   |
| golden@localhost |
1 row in set (0.00 sec)

mysql> create database testing;
Query OK, 1 row affected (0.03 sec)

mysql> grant all privileges on testing.* to test;
Query OK, 0 rows affected (0.02 sec)

mysql> drop database testing;
Query OK, 0 rows affected (0.12 sec)

-but yet again, think twice before deleting root user.

Wednesday, October 20, 2021
Alan Clark
answered 2 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :