centos6.5,安装完xampp5.6.30,启动mysql报错,不能产生.err文件


[root@zabbix_server ~]# /opt/lampp/lampp startmysql

XAMPP: Starting MySQL...ok.

[root@zabbix_server ~]# /opt/lampp/bin/mysqld_safe_helper: Can't create/write to file '/opt/lampp/var/mysql/zabbix_server.err' (Errcode: 13 "Permission denied")


检查目录权限

[root@zabbix_server ~]# ll /opt/lampp/var/mysql/

total 86056

-rw-rw---- 1 mysql mysql    16384 Jun 28 18:53 aria_log.00000001

-rw-rw---- 1 mysql mysql       52 Jun 28 18:53 aria_log_control

-rw-rw---- 1 mysql mysql 77594624 Jun 28 18:53 ibdata1

-rw-rw---- 1 mysql mysql  5242880 Jun 28 18:53 ib_logfile0

-rw-rw---- 1 mysql mysql  5242880 Nov 25  2015 ib_logfile1

-rw-rw---- 1 mysql mysql        0 Nov 25  2015 multi-master.info

drwx------ 2 mysql mysql     4096 Jun 28 18:35 mysql

drwx------ 2 mysql mysql     4096 Jun 28 18:35 performance_schema

drwx------ 2 mysql mysql     4096 Jun 28 18:35 phpmyadmin

drwx------ 2 mysql mysql     4096 Jun 28 18:35 test


修改成root:root 以及 chmod 777都不生效


经反复测试,需要修改/opt/lampp目录的权限才可以


[root@zabbix_server ~]# chmod 755 /opt/lampp/


再启动xampp就正常了


[root@zabbix_server ~]# /opt/lampp/lampp startmysql

XAMPP: Starting MySQL...ok.

[root@zabbix_server ~]#