Home  >  Article  >  Database  >  linux-数据如果直接输入 mysql -hIP 报错?

linux-数据如果直接输入 mysql -hIP 报错?

WBOY
WBOYOriginal
2016-06-06 09:37:031361browse

mysqllinux

linux 的登录用户是 root

数据如果直接输入 mysql -hIP 报错:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)。
然后说权限问题。
然后执行赋权操作

grant all privileges on . to 'root'@'%' identified by 'mysql';
grant all privileges on . to 'root'@'localhost‘ identified by 'mysql';
flush privileges;
然后依然不可以连接。请大神们指教。

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