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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-02-2004, 07:43 PM
|
#1
|
Member
Registered: Feb 2003
Location: The Attic. Nowhere near Texas.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133
Rep:
|
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!!
|
|
|
02-02-2004, 09:25 PM
|
#2
|
LQ Newbie
Registered: Jan 2004
Distribution: Slackware 2.6.5, Slackware 2.6.4, RedHat 9 2.4.20-8
Posts: 23
Rep:
|
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.
|
|
|
02-02-2004, 09:39 PM
|
#3
|
Member
Registered: Feb 2003
Location: The Attic. Nowhere near Texas.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133
Original Poster
Rep:
|
Yep. Thanks.
I guess I didn't realize I had the permissions to edit the 'mysql' db.
|
|
|
All times are GMT -5. The time now is 10:38 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|