LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-02-2004, 07:43 PM   #1
TexasDex
Member
 
Registered: Feb 2003
Location: The Attic. Nowhere near Texas.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133

Rep: Reputation: 15
Fixing MySQL root account permissions.


Background:
I did some major messing around with my MySQL installation in the process of upgrading from the 3.23 server to the 4.0 server. I didn't quite know what I was doing and as a result when it didn't work I tried all sorts of commands like mysql_fix_privilege_tables and stuff like that. I don't remember exactly what I did, but eventually I re-installed the MySQL client program from the disk.

Current problem:
The MySQL server is working fine now, but the root@localhost or even the root@% account has somehow lost it's superuser status. This may have been because of my trying to fix the server earlier, I don't know. But now when I want to add a new user or database I get the message that I do not have sufficient permission to do so. I have checked all of my usernames on MySQL and none of them are allowed to create new users or change user permissions. I am essentially stuck with the current setup because none of the accounts has permission to modify the user settings.

I have tried using MySQLcc (which was the original cause for the upgrade since it would cause MySQL to crash every time it tried to connect) and the local command line with the grant option e.g.
GRANT ALL PRIVILEGES ON bulletinboard.* TO user@"%" IDENTIFIED BY 'imnotthatdumb' WITH GRANT OPTION;
or even
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'noiwonttellyoumypassword' WITH GRANT OPTION;

It says
Error 1045: Access Denied for user root@localhost
every time I do this. I have tried using the mysql_setpermission app and it says Access Denied also.
I have done all of these things signed in as root and have entered the proper password. None of the accounts, however, can add permissions. Is there some file I need to edit in vim or some binary that will restore the superuser status for the root MySQL account?

HELP!!
 
Old 02-02-2004, 09:25 PM   #2
YMHiK
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware 2.6.5, Slackware 2.6.4, RedHat 9 2.4.20-8
Posts: 23

Rep: Reputation: 15
I assume you are able to edit tables with your account
Check if you have proper "flags" in mysql database, in 'user' table.
Update you 'Grant_priv' column to 'Y' if needed.
Hope it helps.
 
Old 02-02-2004, 09:39 PM   #3
TexasDex
Member
 
Registered: Feb 2003
Location: The Attic. Nowhere near Texas.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133

Original Poster
Rep: Reputation: 15
Yep. Thanks.

I guess I didn't realize I had the permissions to edit the 'mysql' db.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
account with root permissions NonSumPisces Linux - Newbie 33 08-02-2013 05:18 PM
fixing mount permissions? zero79 Debian 6 05-06-2005 10:15 AM
MySQL root permissions deleted newuser455 Linux - Software 6 03-20-2005 12:50 PM
MySQL deleted root account and can't re-install... ivj Linux - Software 2 07-09-2004 10:51 PM
reset all file permissions, nothing works, need help fixing qwijibow Linux - General 5 06-14-2004 03:17 PM


All times are GMT -5. The time now is 06:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration