Home  >  Article  >  Database  >  mysql去掉localhost限制_MySQL

mysql去掉localhost限制_MySQL

WBOY
WBOYOriginal
2016-06-01 13:08:531012browse

前提必须知道当前mysql的root密码 忘记密码的请百度后 再弄

#mysql -u root -p


输入密码


然后执行一下语句

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;


密码就修改成了password,顺便也去掉了localhost的限制了,为了安全 不是在局域网 建议不要这么做

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn