0

Regarding the first answer to the Question Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user 'root'@'localhost'(using password:YES), after step 3, says if connection is denied then type

    mysql >GRANT ALL ON [DatabaseName].* TO 'root'@'127.0.0.1' IDENTIFIED BY '[PASSWORD]';

But when i type the following in command prompt of Windows,

    C:\Program Files\MySQL\MySQL Server 5.6\bin>GRANT ALL ON MySQL Server 5.6.* TO'root'@'127.0.0.1' IDENTIFIED BY '[password]';

I get the following error.

'GRANT' is not recognized as an internal or external command,operable program or batch file.

Please help as I'm trying to establish the connection between MySQL and the Database.

Community
  • 1
  • 1
Vijayan
  • 21
  • 7
  • Did you set MYSQL_HOME variable value? – Semih Eker Dec 09 '14 at 08:01
  • No I did not. Please guide me to set it up. – Vijayan Dec 09 '14 at 08:02
  • @SemihEker I set up the MYSQL_HOME variable and the path. But I'm still getting the same error when I use the GRANT command. – Vijayan Dec 09 '14 at 09:06
  • did you write mysql before your GRANT statement? You can run your GRANT in Mysql,I think you are writing your GRANT in bin directory. I'm not sure but could you try like this; firstly mysql; and then GRANT ALL ON MySQL Server 5.6.* TO'root'@'127.0.0.1' IDENTIFIED BY '[password]'; – Semih Eker Dec 09 '14 at 11:09

0 Answers0