LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-23-2002, 04:06 PM   #1
matt
Member
 
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.

Thanks,
)Matt.

Last edited by matt; 01-23-2002 at 04:18 PM.
 
Old 01-23-2002, 06:50 PM   #2
notsoevil
Member
 
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:

"PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
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, 12:03 PM   #3
matt
Member
 
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!
 
  


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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration