(create a page to keep track of things I learned) |
(→=MySQL) |
||
Line 1: | Line 1: | ||
==Computer Stuff== | ==Computer Stuff== | ||
===MySQL== | ===MySQL=== | ||
'''Problem:''' | |||
mysql> create database newdatabase; | mysql> create database newdatabase; | ||
Line 7: | Line 9: | ||
ERROR 1044 (42000): Access denied for user 'user'@'localhost'... | ERROR 1044 (42000): Access denied for user 'user'@'localhost'... | ||
Solution: | '''Solution:''' | ||
[http://dev.mysql.com/doc/refman/5.1/en/creating-database.html mysql] | |||
1. Check grants for 'user'@'localhost' in mysql: | 1. Check grants for 'user'@'localhost' in mysql: |
Revision as of 19:42, 28 November 2009
Computer Stuff
MySQL
Problem:
mysql> create database newdatabase;
ERROR 1044 (42000): Access denied for user 'user'@'localhost'...
Solution:
1. Check grants for 'user'@'localhost' in mysql:
mysql> show grants for 'user'@'localhost';
2. Log into mysql as root (has all privileges) and change grants for a specific user:
mysql> grant all privileges on *.* to 'user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
3. Log back into mysql as user (now has all privileges) and try creating a new database again.