#1130 - Host ‘localhost’ is not allowed to connect to this MySQL server

后端 未结 3 1602
耶瑟儿~
耶瑟儿~ 2020-12-01 22:36

I issued a command of:

DROP USER \'root\'@\'localhost\'; GRANT ALL PRIVILEGES ON . TO \'root\'@\'%\';

...in PhpMyAdmin. Immediately after t

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 23:18

    Use the IP instead:

    DROP USER 'root'@'127.0.0.1'; GRANT ALL PRIVILEGES ON . TO 'root'@'%';
    

    For more possibilities, see this link.

    To create the root user, seeing as MySQL is local & all, execute the following from the command line (Start > Run > "cmd" without quotes):

    mysqladmin -u root password 'mynewpassword'
    

    Documentation, and Lost root access in MySQL.

提交回复
热议问题