打开 mysql 的查询窗口(使用root),使用SQL: -- 使用mysql库 use mysql; -- 更新密码 update user set password=PASSWORD('xxxxxxxx') where User='root'; -- 开启外部访问权限 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'xxxxxxxx' WITH GRANT OPTION; -- 提交 FLUSH PRIVILEGES;
mysql安装后默认是localhost访问,如果需要外部访问可以设置一个新的账号把host改为%,意味着所有ip均可以访问 grant all privileges on *.* to 'outUser'@'%' identified by '12' with grant option 然后 flush privileges; 就可以使用outUser账户密码12来外部访问,有的时候无法访问需要打开防火墙开放端口 centos 7 中使用的是firewall-cmd命令 # firewall-
开放访问权限 D:\wamp\bin\apache\apache2.4.9\conf 里的 httpd.conf 搜索www 把 Require local 改为 Require all granted DocumentRoot "d:/wamp/www/" ## Each directory to which Apache has access can be configured with respect# to which services and features are