Home > Database > Mysql Tutorial > mysql远程访问被拒绝问题_MySQL

mysql远程访问被拒绝问题_MySQL

WBOY
Release: 2016-06-01 13:35:25
Original
1089 people have browsed it

bitsCN.com

远程连接MySql数据库时:

  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

远程连接被拒绝;

解决方法:

MySQL> use MySQL;
Database changed
MySQL> grant all privileges on *.* to ‘yourUser’@'%' identified by ‘yourPassword’;
Query OK, 0 rows affected (0.00 sec)
*.*标示所有数据库下的所有表,’*’.*标示数据库*下的所有表
MySQL> grant all on *.* to ‘yourUser’@'%' identified by ‘yourPassword’;
Query OK, 0 rows affected (0.00 sec)
%号出可以填写允许访问的IP地址或者主机名,%标示所有的IP
Flush privileges;
Query OK, 0 rows affected (0.00 sec)
Mysql> exit;

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template