Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 03-08-2002, 03:36 AM   #1
maxpico
Prospect
 
Join Date: Mar 2002
Posts: 34
MySQL authentication problem

I've installed the MySQL package from entropy.ch http://www.entropy.ch/software/macosx/mysql/
But when I want to connect to the MySQL server via a Perl script it say
Could not connect to database. Reason: Access denied for user: 'root@localhost' (Using password: YES)
So I wrote to the entropy.ch's webmaster and he told me to go at this page http://sourceforge.net/forum/message.php?msg_id=198555

But when I enter this line into the Terminal it say "mysql: No match."
This is the line I've entered
mysql -u root -p mysql GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY mypassword

Please HELP!
maxpico is offline   Reply With Quote
Old 03-09-2002, 05:22 PM   #2
sycodon
Prospect
 
Join Date: Mar 2002
Posts: 5
If you try just entering the first part, "mysql -u root -p mysql", you will find yourself in the MySQL system. You can then do the GRANT command.

That being said, it didn't help me connect via PHP. Go figure.
sycodon is offline   Reply With Quote
Old 03-10-2002, 09:33 AM   #3
m31UW
Prospect
 
Join Date: Mar 2002
Posts: 7
Did you run (from mysql dir) ./scripts/mysql_install_db, after the mysql install, the root password (for mysql user) is not set you should set this too.

You can set it by using:
mysqladmin -u root password new_password_here

Then you can login by
mysql -u root -p
and it will ask for your new password, ytpe it in to login.
m31UW is offline   Reply With Quote
Old 03-11-2002, 07:39 AM   #4
maxpico
Prospect
 
Join Date: Mar 2002
Posts: 34
The problem is that I run Mac OS X server 10.1.3.
I'v installed various time the double-clickable version of MySQL provided by entropy.ch http://www.entropy.ch/software/macosx/mysql/
Now the problem is that I get this error ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
So for starting the MySQL server I use the line
cd /usr/local/mysql; sudo ./bin/safe_mysqld --user=mysql &
but after this Darwin say Password:
so I enter my password but after it say something like Password: command not understood
Probably there are conflicts in the system because I'm running the Server version of OS X that have already MySQL installed... But how can I resolve this?
Thank you very very much
maxpico is offline   Reply With Quote
Old 03-11-2002, 04:21 PM   #5
m31UW
Prospect
 
Join Date: Mar 2002
Posts: 7
Not sure if this is your prob, but........did you change the ownership for the mysql directory?
chown -R mysql /usr/local/mysql (or wherever it was put).
chgrp mysql /usr/local/mysql

Like I said, this may help although you may have allready done this.
checkout:
http://www.oreillynet.com/pub/a/mac/..._5.html?page=2

The above link shows how to compile/install set perms AND also the binary install .pkg from where you got yours, Marc Liyanage's .pkg at www.entropy.ch
m31UW is offline   Reply With Quote
Old 03-11-2002, 04:25 PM   #6
m31UW
Prospect
 
Join Date: Mar 2002
Posts: 7
I don't think that the OSX Server vs. OSX Client should matter.
m31UW is offline   Reply With Quote
Old 03-11-2002, 05:37 PM   #7
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
Quote:
Originally posted by maxpico
So for starting the MySQL server I use the line
cd /usr/local/mysql; sudo ./bin/safe_mysqld --user=mysql &
but after this Darwin say Password:
so I enter my password but after it say something like Password: command not understood

you should search the forums for that [ /bin/safe_mysqld ] because we discovered about sudo's backgrounding stuff.

edit: had trouble with that suggested search above, i thnik it's the slashes, but here's the thread...

http://forums.macosxhints.com/showth...&threadid=1421

try:
Code:
sudo -b ./bin/safe_mysqld --user=mysql

# ^- note that there is no & at the end of the command here
that -b switch should ask for pw then fork that humper into the background and you can drive on.

Last edited by mervTormel; 03-11-2002 at 09:54 PM.
mervTormel is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump



All times are GMT -5. The time now is 09:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.