I'm new to MySQL, so I hope the gurus will catch anything I get wrong below. However, this methodology worked for me.
At 3:38 PM +0000 12/20/01, Matthew Darcy wrote: >I have set the root password for the mysql install. > >I have read the manual and want to make a new database. I ran >mysql_install_db (see my other mail today) which seemed to do little, then >did what the manual told me with > >[mysqldba@jordan bin]$ ./mysqladmin create bathjobs >./mysqladmin: CREATE DATABASE failed; error: 'Access denied for user: >'@localhost' to database 'bathjobs'' >[mysqldba@jordan bin]$ > >why is this happening ? Because, as you said above, you set the root password. The command you're executing would probably have worked fine before you did so. That's not to say setting the root password was a bad thing--it was, in fact, a good thing. It just would have been easier had you created the database and THEN set the root password. :-) But now that you have a root password, try this: 1. Log into mysql with "mysql -u root -ppassword" (where "password" is the root password you set. No, there should not be a space between the "-p" and your password.) 2. mysql> CREATE DATABASE databasename; mysql> GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED BY 'password'; mysql> USE mysql; mysql> UPDATE user SET File_Priv='Y' WHERE User='username'; "username" is the user you created to run mysql. I created a user named (inventively enough) "mysql" and used that. It's probably confusing, though, and I should have called it "mysqluser" or "mysqlaccount" to differentiate it from the mysql executable. Another option might be to try ./mysqladmin -u root -ppassword create databasename, but since I didn't do it that way, I can't vouch for whether it works. Give it a try and let me know; I'm curious. Good luck, -Kurt -- I haven't failed, I've found 10,000 ways that don't work. -- Benjamin Franklin --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php