I need to login to mysql using root user and create a database. However, when I login to PhpMyAdmin as root user, it tells me that it has "no privileges", therefore cannot create a database.

I did not expect this to happen when I installed phpMyAdmin. Is there a way to fix this? Please help, thank you!

Version info:

OS: OpenSUSE 12.1

MySQL: mysql Ver 14.14 Distrib 5.5.25, for Linux (x86_64) using readline 6.2

PhpMyAdmin: 3.4.10.2

4

11 Answers

Login using the system maintenance user and password created when you installed phpMyAdmin.
It can be found in the debian.cnf file at /etc/mysql then you will have total access.

sudo nano /etc/mysql/debian.cnf 

Just look - don't change anything!

[mysql_upgrade] host = localhost user = debian-sys-maint <----use this user password = s0meRaND0mChar$s <----use this password socket = /var/run/mysqld/mysqld.sock 

Worked for me.

3

If you are using Chrome. try some other browser. there where previous posts on this issue saying that phpmyadmin didnot provide privileges for root on chrome.

or try this

name: root

password: password

5
sudo mysql 

enter your (LINUX) account password

grant create on *.* to user@localhost; FLUSH PRIVILEGES; 
1

This worked for me

open config.inc.php file in phpmyadmin root, set auth type from cookie to config

$cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; // leave blank if no password 
4

Look at the user and host column of your permission. Where you are coming from localhost or some other IPs do make a difference.

Use these:

  • username : root
  • password : (nothing)

Then you will get the page you want (more options than the admin page) with privileges.

This worked for me(in Chrome):

Login to phpmyadmin, and follow "Home" -> "Privileges" -> "Reload the Privileges". After this, clear your browser's cache and retry.

Regards, Pedro Sousa

6

login in the terminal as a root and execute this command:

mysql_secure_installation

Type n in order to not change root password and hit enter, then type y to remove anonymous users and hit enter. Type n if you want to disallow root login remotely and hit enter. Now type y to remove test tables and databases and hit enter, then type y again and hit enter.

and you are good to go :)

I solved my issue like that. You need the change auth_type 'config' to 'http'. My older settings auth_type is 'config' then i changed to 'http' and problem solved.

When you changed that area and enter the phpMyAdmin, browser asks you a user and password. You just enter 'root' and dont fill the password area and press enter.

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

My problem was on my KSWEB app that I downloaded. I am having no privileges error, but when I opened my config.inc.php and changed

$cfg['Servers'][$i]['auth_type'] = 'cookie'; 

to

$cfg['Servers'][$i]['auth_type'] = 'config'; 

It worked and I now have privileges to create a database.

1

It appears to be a transient issue and fixed itself afterwards. Thanks for everyone's attention.

1