데이터베이스

[mysql] Failed to connect to mysql at 127.0.0.1:3306 with user root

지승준 2015. 3. 2. 12:38

1) In your windows run 'cmd' to open a terminal


Try both

2a) mysql -u root -p -h 127.0.0.1 -P 3306

2b) mysql -u root -p -h localhost -P 3306


3) If the connection is good you will get a password prompt, see if you can connect with correct password.


If your connection is denied, just grant the permission


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

If your connection is accepted here, it's like a workbench configuration problem.