原因是apache 自带数据库和linux原来数据库冲突 解决方案: vi /etc/my.cnf 添加下面内容,改掉linux本地端口,再重启mysqld stop apache 的mysqld ,重启apache 就可以