1

i created a new user parashu @ localhost, i need to create a database in it

mysql> create database college;
ERROR 1044 (42000): Access denied for user 'parashu'@'localhost' to database 'college'

I used this commands in root user but not solved.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'parashu'@'localhost';
Query OK, 0 rows affected (0.00 sec)

and also used

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> mysqladmin reload;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqladmin reload' at line 1

but not solved the problem please help me.

mysql> show grants;
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*11B9028F347AE95EE039F02A8729496D29AD1616' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> show grants;
+-------------------------------------------------------------------------------------------------------------------------+
| Grants for parashu@localhost                                                                                            |
+-------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'parashu'@'localhost' IDENTIFIED BY PASSWORD '*CED889944E42FC9A28385BF832FA12BEE77F1D47' |
| GRANT ALL PRIVILEGES ON `school`.* TO 'parashu'@'localhost'                                                             |
+-------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

0 Answers0