visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: Problem creating MySQL Database


By: ephon U.S.A.  Date: 10/07/2003 00:00:00  English  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 English  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 English  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 English  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 English  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

EContact
browser fav
page generated in 373.955010 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page