phpMyAdmin reports 'No Privileges'
Asked Answered
W

6

12

Long story short, I ended up deleting the root user from PHPMyAdmin in EasyPHP. After some researching, I used skip-grant-tables to regain database access. Now, however, I cannot do anything as the root user has 'No Privileges.'

That stated, when logged in as 'root,' I do, indeed, have the ability to create a database via SQL.

I've tried the following, and similar:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';
FLUSH PRIVILEGES;

Still, I can't do anything. Additionally, I have this message:

The additional features for working with linked tables have been deactivated. To find out why click here.

Clicking through shows:

$cfg['Servers'][$i]['pmadb'] ...    OK
$cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
General relation features: Disabled

$cfg['Servers'][$i]['table_info'] ...   not OK [ Documentation ]
Display Features: Disabled

$cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['pdf_pages'] ...    not OK [ Documentation ]
Creation of PDFs: Disabled

$cfg['Servers'][$i]['column_info'] ...  not OK [ Documentation ]
Displaying Column Comments: Disabled
Browser transformation: Disabled

$cfg['Servers'][$i]['bookmarktable'] ...    not OK [ Documentation ]
Bookmarked SQL query: Disabled

$cfg['Servers'][$i]['history'] ...  not OK [ Documentation ]
SQL history: Disabled

$cfg['Servers'][$i]['designer_coords'] ...  not OK [ Documentation ]
Designer: Disabled

$cfg['Servers'][$i]['tracking'] ... not OK [ Documentation ]
Tracking: Disabled

Reinstalling EasyPHP doesn't fix the problem, and nothing exists in VirtualStore (as one forum post suggested). Is there a specific MySQL file I should be looking for?

Any ideas? This has really put a stop to my application development.

Thanks.

Wrongheaded answered 22/1, 2011 at 20:24 Comment(7)
It sounds like you just need to set up the grant tables properly. If you could do me a favor and SELECT * FROM mysql.user WHERE user = 'root' (with --skip-grant-tables on of course) and paste what that gives you, it might help.Bruit
And you're connecting to 'localhost' when you connect? (MySQL can be obtuse sometimes; if you connect to your IP address, it likes to see you as coming from your IP rather than localhost.)Bruit
Yes. 127.0.0.1 also has all Y's. I'm running all this through EasyPHPWrongheaded
Interesting... PHPMyAdmin reports no privileges, but typing 'CREATE DATABASE test' actually creates a database.Wrongheaded
Yeah, there's often a line in mysql.db granting anyone the permission to create a database whose name starts with (or is) "test". Speaking of, check that table for any references to root, or to % or a blank user, that has 'N' for any or all of the first five permissions (select, insert, update, create).Bruit
The only two rows are 127.0.0.1 and localhost, both with root as userWrongheaded
Don't forget the "with grant option". You've re-created the root user, but without the grant option, that user cannot create any other accounts.Ona
V
21

This was super annoying.

It appears to be a bug with phpMyAdmin.

Clear your browser cookies, what's happening is phpMyAdmin has "cached" the fact that you do not (or possibly didn't have at some point) create database access.

There's no way to reset it other than deleting your cookies for phpMyAdmin in your browser window (to get a new 'session id'), or deleting the session files on the phpMyAdmin web server.

Vasti answered 15/8, 2011 at 12:33 Comment(1)
This worked for me. I just opened the resources tab in the Chrome Developer Console (Ctrl+Shift+I) and manually deleted all the cookies on localhost.Faris
B
4

If your machine has IPv6 enabled, "localhost" will resolve to ::1, rather than 127.0.0.1. This can cause issues.

Try connecting to "127.0.0.1" rather than "localhost". That ought to force mysql to authenticate by IPv4 address, so make sure 127.0.0.1 is in there.

Alternatively, if you have admin access, you can map localhost back to 127.0.0.1 in c:\Windows\System32\Drivers\etc\hosts.

Bruit answered 22/1, 2011 at 21:5 Comment(3)
When I connect, I use 127.0.0.1, according to the EasyPHP config.Wrongheaded
And there's a line in the user table for [email protected] ?Bruit
Yes, but it turned out to be a browser issue. I appreciate the help!Wrongheaded
J
2

cHao and Andrew's answers solved the problem for me. I reset all permissions in the MySQL db, user table, to yes. All dbs then reappeared in phpMyAdmin, but I had no 'create db' privilege there. Cleared the phpMyAdmin cookie and even upgraded phpMyAdmin with no success. Then I went into the tmp/php directory and deleted a session file I found there (named sess + random ascii), and success!

Judd answered 25/10, 2012 at 15:45 Comment(0)
W
1

Turns out to be some sort of issue specific to Google Chrome, as it now works in IE. I'll try running CCleaner.

Thanks all.

Wrongheaded answered 22/1, 2011 at 21:10 Comment(3)
Weird. I was having the same issue with root privs in Chrome. Upon reading this answer, I logged in with Firefox and everything is fine. This is on OSX, so I don't think it's related to anything your Windows computer.Colocynth
Same thing happened to me, does anybody know why or how to fix it?Trinity
It's not a browser specific thing and it can't be. Try clearing cache and cookies.Tessy
C
0

I just experienced the same issue (lost access to my local databases). The problem does seem to be related to browsers running Gecko or similar (like KHTML... I'm on Opera). After deleting the phpMyAdmin cookie, as suggested, I still had No Privileges. So I went to localhost/xampp, then clicked on Security. On that page is a link (h-t-t-p://localhost/security/xamppsecurity.php) that took me to a page entitled Security console MySQL & XAMPP directory protection)

I left the current password field blank and entered a new password; I think I selected cookie as the PhpMyAdmin authentication method (it actually says PhpMyAdmin authentification, but hey...). Once I had submitted the password change and tried again to access phpMyAdmin, I got all my databases back and am again able to create more; the No Privileges message has disappeared!

There is still the message at the bottom saying

The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.

But that's another river for another time.

Crudity answered 4/5, 2015 at 20:7 Comment(0)
S
0

Been stuck with this a few times over the last few years... Easiest method I've found was today whilst setting up an RPi.

From the terminal run: $sudo mysql_secure_installation and set up as appropriate for your implementation.

Then, setup user access with: $sudo mysql_setpermission this will allow you to set a super/root user.

Just follow the prompts.

Sharonsharona answered 9/7, 2018 at 2:10 Comment(1)
Just checked, still works on all my linux boxes that I have mysql running on. What setup are you using?Sharonsharona

© 2022 - 2024 — McMap. All rights reserved.