ERROR 1044 (42000): Access denied for user: ''@'localhost' to database 'sagar'
i get this error when i am trying to create a database? how do i get over this?
i am using mysql-4.1.1a-alpha
On Sat, 2004-09-18 at 01:34, Vidyasagar Venkatesh wrote:
ERROR 1044 (42000): Access denied for user: ''@'localhost' to database 'sagar'
i get this error when i am trying to create a database? how do i get over this?
i am using mysql-4.1.1a-alpha
You need to set up your users and permissions first. While I'd suggest you read the excellent MySQL online manual first (available on the MySQL website, http://www.mysql.com), I'll provide a brief summary here to get you started. User privileges are defined in the mysql database under the user table. Log into this table with the command "mysql -u root mysql" (assuming there is no mysql root user password set), and check the user table. You can then add access for a user with the GRANT command (e.g. grant all on * to user 'user'@'host' will allow total access to all your databases to user@host - not a very good idea though, make sure you audit permissions before granting them).
HTH,
Krishnan