Content
Set up database_access denied
Added by julia dempewolf over 10 years ago
Hey all,
I was very proud to have managed to follow the installation steps up to this point, but at “set up database” I ran into a wall. Since my knowledge of the inner workings of my mac (Mavericks) is very limited/close to non existing, I would appreciate advice regarding what to do next. :)
the error message that terminal gave me:
mysql> CREATE DATABASE openproject CHARACTER SET utf8;
ERROR 1044 (42000): Access denied for user ’‘'localhost' to database 'openproject' mysql> CREATE USER 'openproject'
’localhost’ IDENTIFIED BY ‘my_password’;
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
mysql> GRANT ALL PRIVILEGES ON openproject.* TO ‘openproject’'localhost'; ERROR 1044 (42000): Access denied for user ''
‘localhost’ to database ‘openproject’
Replies (1)
Hi Julia,
I’m glad to hear that you’ve progressed that far. Let’s see how we can help you to finish the installation.
I suspect that you started the mysql console with an anonymous account, which is not allowed to create new databases or users.
The
mysql
command on the command line gives you (administrative) access to your databases. But MySQL needs to verify that you are actually allowed to do important changes (like creating a database or a new user). MySQL has different user accounts for that (just like your Mac has different users). The MySQL administrator account is called “root”. The trick is to startmysql
and tell it that you are using theroot
user.(I think the root user starts with an empty password; You should set the root password if it is still empty:
SET PASSWORD FOR ''
‘localhost’ = PASSWORD ('newpassword');@)Now that you are logged in with the
root
account, the MySQL commands should work.cheers,
tessi