mysql> GRANT ALL ON [dbname].[table] TO '
username'@'localhost' IDENTIFIED BY ' secret_password';
First login to mysql with root account and use following command to create new user ‘
mysql> GRANT ALL ON *.* TO '
rahul'@'localhost' IDENTIFIED BY ' secret_password'; mysql> FLUSH PRIVILEGES;
Now try to login using new password
# mysql -u username -p'
secret_password' Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 9522 Server version: 5.5.30-cll MySQL Community Server (GPL) by Atomicorp Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql>