1.3 开启mysql的远程 MySQL 1130错误解决方法: 通过MySQL-Front或navicat for mysql连接MySQL的时候发生的这个错误 ERROR 1130: Host ***.***.***.*** is not allowed to connect to this MySQL server 说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录。 需更改 MySQL 数据库里的 user表里的 host项 把localhost改成%
具体步骤:登陆到MySQL 首先 use MySQL; MySQL> update user set host='%' where user = 'root'; ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY' 然后查看下数据库的host信息如下: MySQL> select host from user where user = 'root'; +-----------------------+ | host | +-----------------------+ | % | | 127.0.0.1 | | localhost.localdomain | +-----------------------+ 3 rows in set (0.00 sec) host已经有了%这个值,所以直接运行命令: MySQL>flush privileges; 再用MySQL administrator/navicat for mysql连接...成功!!
2 安装apache 2.1 Apache组件 # yum install httpd # chkconfig httpd on 设置开机启动 # chkconfig --levels 235 mysqld on # /etc/init.d/httpd start # Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using payment.meijialclub.com for ServerName [ OK ] # vi /etc/httpd/conf/httpd.conf 找到#ServerName www.example.com:80然后在下面加入如下 ServerName 127.0.0.1/ip:80 然后重启apache /etc/init.d/httpd restart