Databases :: MySql :: Problem creating MySQL Database |
|||
| By: ephon |
Date: 10/07/2003 00:00:00 |
Points: 125 | Status: Answered Quality : Excellent |
|
Hi, please help me.... Everytime I want to create a database using the command : Mysql>create database user; I got this error msg error 1044 : access denied for user '@localhost' to the database 'user' plz help...... |
|||
| By: VGR | Date: 10/07/2003 20:16:00 | Type : Comment |
|
| of course, 'user' is a RESERVED MYSQL SYSTEM DATABASE don't you confound "create database user" with "create table user" ? ;-) |
|||
| By: VGR | Date: 10/07/2003 20:17:00 | Type : Answer |
|
| in fact, I may be wrong. you should be able to create a database named "user", how illogical this may seem. The problem seems to lie in the "user [empty]@localhost" : how have you connected ? have you used : mysql --user=user --password=thepassword ? |
|||
| By: Ice_S5 | Date: 10/07/2003 21:07:00 | Type : Assist |
|
| You can also try creating database using: mysqladmin create your_DB_name Have you set up administrator's password ? |
|||
| By: paullamhkg | Date: 10/07/2003 21:10:00 | Type : Assist |
|
| After a fresh installation, you should connect to the server and set up your users and their access permissions: shell> mysql -u root mysql The server should let you connect because the MySQL root user has no password initially. That is also a security risk, so setting the root password is something you should do while you're setting up your other MySQL users. If you try to connect as root and get this error: Access denied for user: '@unknown' to database mysql this means that you don't have an entry in the user table with a User column value of 'root' and that mysqld cannot resolve the hostname for your client. In this case, you must restart the server with the --skip-grant-tables option and edit your `/etc/hosts' or `\windows\hosts' file to add an entry for your host. the above is from <A HREF="http://www.mysql.com/doc/en/Access_denied.html">http://www.mysql.com/doc/en/Access_denied.html</A> have a look may help you can set the root password by below step shell> mysql --user=root mysql mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password'); If you know what you are doing, you can also directly manipulate the privilege tables: shell> mysql --user=root mysql mysql> UPDATE user SET Password=PASSWORD('new_password') -> WHERE user='root'; mysql> FLUSH PRIVILEGES; Another way to set the password is by using the mysqladmin command: shell> mysqladmin -u root password new_password |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








