[mysql] phpMyAdmin says no privilege to create database, despite logged in as root user

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

This question is related to mysql phpmyadmin

The answer is


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


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 :)


Use these:

  • username : root
  • password : (nothing)

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


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

sudo mysql

enter your (LINUX) account password

grant create on *.* to user@localhost;

FLUSH PRIVILEGES;


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

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.

cd /etc/mysql
sudo nano 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.


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.


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


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


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


Examples related to mysql

Implement specialization in ER diagram How to post query parameters with Axios? PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver' phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' is not supported How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Connection Java-MySql : Public Key Retrieval is not allowed How to grant all privileges to root user in MySQL 8.0 MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Examples related to phpmyadmin

phpMyAdmin on MySQL 8.0 phpmyadmin - count(): Parameter must be an array or an object that implements Countable Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?' phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO) phpMyAdmin access denied for user 'root'@'localhost' (using password: NO) mysqli_real_connect(): (HY000/2002): No such file or directory How to create a foreign key in phpmyadmin #1292 - Incorrect date value: '0000-00-00' MySQL error - #1932 - Table 'phpmyadmin.pma user config' doesn't exist in engine phpMyAdmin Error: The mbstring extension is missing. Please check your PHP configuration