|
|
#1 |
|
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! |
|
|
|
|
|
#2 |
|
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. |
|
|
|
|
|
#3 |
|
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. |
|
|
|
|
|
#4 |
|
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 |
|
|
|
|
|
#5 |
|
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 |
|
|
|
|
|
#6 |
|
Prospect
Join Date: Mar 2002
Posts: 7
|
I don't think that the OSX Server vs. OSX Client should matter.
|
|
|
|
|
|
#7 | |||||||||||||||||||
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
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 Last edited by mervTormel; 03-11-2002 at 09:54 PM. |
|||||||||||||||||||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|