lampp mysql未启动,lampp1.7中mysql无法启动问题

网站环境升级,由于dedecms版本中php5.4中经常中文白页,只有选择低版本的lampp,决定使用lampp1.7.7,解压缩后在启动lampp时提示mysql无法启动。

查看/opt/lampp/var/mysql/www.centos.error文件,报错内容如下:

141109 11:10:19 mysqld_safe Starting mysqld daemon with databases from /opt/lamp

p/var/mysql

141109 11:10:19 [Note] Plugin 'FEDERATED' is disabled.

/opt/lampp/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)

141109 11:10:19 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgr

ade to create it.

InnoDB: The InnoDB memory heap is disabled

InnoDB: Mutexes and rw_locks use InnoDB's own implementation

InnoDB: Compressed tables use zlib 1.2.3

141109 11:10:19  InnoDB: Initializing buffer pool, size = 16.0M

141109 11:10:19  InnoDB: Completed initialization of buffer pool

141109 11:10:19  InnoDB: Operating system error number 13 in a file operation.

InnoDB: The error means mysqld does not have the access rights to

InnoDB: the directory.

InnoDB: File name /opt/lampp/var/mysql/ibdata1

InnoDB: File operation call: 'create'.

InnoDB: Cannot continue operation.

141109 11:10:19 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/www.centos

.pid ended

根据提示,在Plugin和mysqld_safe上研究了半天也没有结果,只好尝试检查一下权限的问题

[root@www bin]# ll /opt/lampp/var/mysql

总用量 28

drwx------ 2 root   root 4096 11月  9 11:10 cdcol

drwx------ 2 root   root 4096 11月  9 11:10 mysql

-rw-r--r-- 1 root   root    5 11月  9 11:10 mysql_upgrade_info

drwx------ 2 root   root 4096 11月  9 11:10 performance_schema

drwx------ 2 root   root 4096 11月  9 11:10 phpmyadmin

drwx------ 2 root   root 4096 11月  9 11:10 test

-rw-rw---- 1 nobody root  974 11月  9 11:10 www.centos.err

看到了吗?mysql工作目录的权限跟mysql创建的文件的权限不一致,修改目录权限为nobody.root试试

[root@www bin]# chown -R nobody.root /opt/lampp/var/mysql

[root@www bin]# /opt/lampp/lampp startmysql

XAMPP: Starting MySQL...

[root@www bin]#

终于启动成功了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值