Abhijit Kumbhar
Abhijit Kumbhar

Reputation: 961

How to create mysql database using command prompt? I'm getting error ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'ivs'

I want to create database in mysql I installed MySQL 5.6 in windows 8, During installation installer never asked me username or password. When I'm executing command "create database ivs;" it gives me following error:

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'ivs' what can I do now?

Upvotes: 1

Views: 845

Answers (2)

Bernd Buffen
Bernd Buffen

Reputation: 15057

You have use the default User and not root. The default User dosent have enough right to Create Databases. Start the Client with root User

c:> mysql -uroot

Upvotes: 3

Abhijit Kumbhar
Abhijit Kumbhar

Reputation: 961

After great discussion with @Bernd Buffen I got solution for my problem, when I use 'create database ivs' I actually not logged in with 'root' user (I'm logged in with guest user) so to change this to root I use following command:

C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin>mysql -uroot and then I use

 mysql> create database ivs; to create database named 'ivs'

Upvotes: 0

Related Questions