Oscar
Oscar

Reputation: 43

Can't connect to MySQL with XAMPP

I have used XAMPP many times before and this has never happened. I do not know what's wrong with it, I have not changed anything in the configuration files.

This is what I get when trying to access localhost/phpmyadmin.
Picture of phpMyAdmin not being able to connect

I can use mysql with my CLI however, using login root (using password: NO). CLI showing that I can access my database.

Here is my configuration file for phpMyAdmin:

...

/* 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'] = '';

...

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

...

Upvotes: 0

Views: 12231

Answers (3)

barry
barry

Reputation: 31

The same problem came with me. It was a permission issue for me with the C: drive. Give the write permission to the xampp folder. I uninstalled it and installed again. Instead of C:\Program files installed directly in C:. It worked.

Upvotes: 0

ali
ali

Reputation: 1

restart your computer & it may solve your problem.

Upvotes: -1

Lakshika Wijayasinghe
Lakshika Wijayasinghe

Reputation: 41

Please run following commands.

    #mysqld --skip-grant-tables
    #mysql -u root mysql

    MariaDB [mysql]> UPDATE user SET Password=PASSWORD('YOUR_PASSWORD') 
                     where USER='root';
     MariaDB [mysql]> FLUSH PRIVILEGES;

Upvotes: -1

Related Questions