Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-23-2002, 05:06 PM   #1
Registered: Jul 2001
Location: Chicago
Distribution: RH7.1 ; OSX
Posts: 62

Rep: Reputation: 15
Thumbs down MySql Permissions... I think

Howdy all,

Just got MySql installed, but there's weirdness. Long story short, I can start the daemon, but can't get into the mySql database or create a new one. It seems passwords / permissions are screwed up. I can get command line mySql with a blank password, which leads me to believe that no mysqladmin password has been set. But when I try to do anything that requires this password, I get access denied messages, which includes trying to set the mysqladmin password at the command line.

When I installed mySql, I did get the error message:

Error: 1062 Duplicate Entry 'localhost-root' for key 1

I understand that there is a way to start the server without the grant tables, but don't know the proper command. I've checked the documentation, but it does not give a clear example of how this works and my attempts at this have all failed.

It also looks like it may have installed twice, as in my usr/local folder there's a "mysql" as well as a "mysql-3.23.24" directory. Both have the same things in them, though I can no longer start the server out of the "mysql" directory, as I've probably fubar'ed it trying to fix the permissions with chown. It keeps giving me permission denied messages and will loop inself into trying to restart. I can start the server from the other directory, but cannot do anything useful with it, as mentioned above.

Could someone give me some advise? Should in uninstall / reinstall? I got my 500 page MySql book and I just want to get going.


Last edited by matt; 01-23-2002 at 05:18 PM.
Old 01-23-2002, 07:50 PM   #2
Registered: May 2001
Location: Louisville, Kentucky, USA
Distribution: RedHat ES
Posts: 120

Rep: Reputation: 15
After you did this:

#> make install

You should have done this

#> cd /path/to/your/mysql/bin
#> ./mysql_install_db

You said you were getting in with no root password, so I assume you did do the above. However, you didn't read the output because the command does stuff (sets up default tables and such) and then says something along the lines of:

This is done with:
/path/to/your/mysql/bin/mysqladmin -u root -p password 'new-password'
/path/to/your/mysql/bin/mysqladmin -u root -h yourhostname -p password 'new-password'
See the manual for more instructions

The first mysqladmin command sets up the password for localhost, the second for remote connection to the server.

Did you do this?

If not, and you have been playing around with FILE permissions (not the same as MySQL permissions) and CHOWNs like you said, I would remove your two mysql directories, go back to the source, and just run 'make install' once more. Then follow the instructions above (mysql_install_db etc.).
Old 01-24-2002, 01:03 PM   #3
Registered: Jul 2001
Location: Chicago
Distribution: RH7.1 ; OSX
Posts: 62

Original Poster
Rep: Reputation: 15
The reinstall seems to have done the trick - thanks!


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql permissions... jsheffie Linux - Software 1 10-20-2005 03:37 PM
mysql login permissions mpgram Linux - Software 1 03-05-2004 08:15 PM
File permissions in MySQL hindenbergbaby Linux - Newbie 1 10-11-2003 09:53 PM
restoring mysql databases? and mysql permissions... armegeden Linux - Software 0 03-13-2003 12:04 PM
mysql permissions dai Linux - General 3 02-17-2003 06:00 AM > Forums > Linux Forums > Linux - General

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

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