xamppmysql初始化配置
----------------------------------------------------------
通过HeidiSQL连接MYSQL数据库报错:
SQL Error (1130): Host '192.168.1.126' is not allowed to connect to this MySQL server
说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录。
需更改 mysql 数据库里的 user表里的 host项把localhost改称%
首先按下面的步骤登录Mysql服务器
登录mysql需要切换到dos下的mysql的bin目录,进行如下操作:
1 use mysql; 2 update user set host = '%' where user ='root'; 3 update user set host = '%' where host = 'localhost'; 4 5 Query OK, 0 rows affected (0.00 sec) 6 Rows matched: 0 Changed: 0 Warnings: 0 7 8 flush privileges; 9 select host, user from user; 10 quit
OK。远程连接成功!
你的指尖,有着改变世界的力量!