I want to create a database in MySQL using command line. so I use shell option in xampp to create it. I write this line create database abc; access denied for user @'localhost' to database abc;
Asked
Active
Viewed 1,152 times
0
-
first connect to the mysql database using command "mysql -u username -p password". If it gives access denied , then your credentials are wrong. Or check this link, http://stackoverflow.com/questions/8484722/access-denied-for-user-rootlocalhost-while-attempting-to-grant-privileges that might be related to your issue – random May 23 '16 at 05:48
-
Possible duplicate of [MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)](http://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw) – JYoThI May 23 '16 at 05:57
-
@Aparna this first time I am using shell. so should I use my os user and password? or I should create new user and password in shell? – Saeedeh May 23 '16 at 06:03
-
you just create user first then try to login – JYoThI May 23 '16 at 06:04
-
Not OS credentials, you need to enter the mysql username and password which is set while the installation of mysql – random May 23 '16 at 06:06
-
I dont install my sql i am using shell of xampp – Saeedeh May 23 '16 at 06:08
-
mysql -u root -p and enter try this because default in xampp password may be empty – JYoThI May 23 '16 at 06:10
-
error 1064 when trying mysql -u root -p – Saeedeh May 23 '16 at 06:11