In the install document provided here: http://drupal.org/node/260 and copied in the download package for mac os X the mysql instruction say to grant permissions as following
---------------------------------------------------------------------------
GRANT ALL PRIVILEGES ON drupal.*
TO nobody@localhost IDENTIFIED BY 'password';
where
'drupal' is the name of your database
'nobody@localhost' is the username of your webserver MySQL account
'password' is the password required to log in as the MySQL user
.
.
.
.
$db_url = "mysql://username:password@localhost/database";
where 'username', 'password', 'localhost' and 'database' are the
username, password, host and database name for your set up.
---------------------------------------------------------------------------
this version of drupal, however, appends the '@localhost' portion of the database login such that the corrected documentation should read as follows:
---------------------------------------------------------------------------
GRANT ALL PRIVILEGES ON drupal.*
TO username IDENTIFIED BY 'password';
where
'drupal' is the name of your database
'username' is the username of your webserver MySQL account
'password' is the password required to log in as the MySQL user
.
.
.
.
$db_url = "mysql://username:password@localhost/database";
where 'username', 'password', 'localhost' and 'database' are the
username, password, host and database name for your set up.
---------------------------------------------------------------------------
Comments
Comment #1
bslade commentedShouldn't the grant statement in the revised text read:
Ie. add @localhost after the username.
I suggest adding this because on my version of mysql (4.1.14) leaving the localhost out of the grant statement is the same as saying "allow any host to login with this username" (if you do a select * from the user table in the mysql db you'll see "%" for the Host field).
I think we want to default to allowing a mysql login only from the local machine since that's where the Drupal PHP scripts typically run.
Ben in DC
Comment #2
sepeck commentedupdated through patches.