| Article: |
Apache Web-Serving With Mac OS X, Part 5 | |
| Subject: | didn't work for me... | |
| Date: | 2002-12-23 16:38:00 | |
| From: | csteinfield | |
|
Response to: password problem - just do the following...
|
||
|
I had the same problem, and was not sure if a password ever got set. I don't think so because it lets me enter the MySQL monitor without typing a password. I have tried typing:
|
||
Showing messages 1 through 4 of 4.
-
didn't work for me...
2004-10-16 23:26:47 joe@collabornet.org [View]
-
didn't work for me...
2003-07-22 18:18:30 anonymous2 [View]
Same problem here. This is driving me NUTS. What am I doing wrong!? -
didn't work for me...
2003-08-03 03:30:06 anonymous2 [View]
Same here. -
This should work...
2003-10-04 21:19:26 anonymous2 [View]
First log into mysql, for me it's:
sudo /usr/local/mysql/bin/mysql -p
first you will be asked to enter your admin password, the one you use to install software. next you enter the current mysql root password.
Then to change your password, enter:
SET PASSWORD FOR root@localhost=PASSWORD('new_password');
Where new_password is your new password...
msvara



$dbh = mysql_connect( "localhost", "localhost", "" ) or die("not happening");
INSTEAD OF
$dbh = mysql_connect( "localhost", "root", "" ) or die("not happening");
Of course this doesn't address the core of the issue--setting the mysql root password however, it does allow you to play with php & mysql a bit.
If your setup is purely for testing purposes only than having your system securely locked down perfect is a secondary issue. The more important thing is being able to check your code to ensure it works locally before uploading to the real web server where it matters.