I'm trying to set up a XAMPP installation on my work laptop - that's why I go for XAMPP and not regular LAMP so I don't have to have start-up services etc. But I get an error when trying to start MySQL. I've tried changing permissions but I don't really know what to do.

Here is my error log:

110922 21:39:20 mysqld_safe Starting mysqld daemon with databases from /opt/lampp/var/mysql
110922 21:39:20 [Note] Plugin 'FEDERATED' is disabled.
/opt/lampp/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
110922 21:39:20 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110922 21:39:20 InnoDB: The InnoDB memory heap is disabled
110922 21:39:20 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
110922 21:39:20 InnoDB: Compressed tables use zlib 1.2.3
110922 21:39:20 InnoDB: Initializing buffer pool, size = 16.0M
110922 21:39:20 InnoDB: Completed initialization of buffer pool
110922 21:39:20  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.
110922 21:39:20 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/niklas-ubuntu.pid ended

Does anyone have any idea how to fix this?

Thank you for your time! :)

  • Do you know what username XAMPP tries to run the DB as? – Bart B Sep 23 '11 at 14:45

I've never used XAMPP's version of MySQL, so I'm not sure whether it tries to run MySQL as the logged in user, or as a special system user called mysql (like regular MySQL does).

But what you need to do is ensure that what ever user the database is running with has permissions on the folder /opt/lampp/var/mysql/ and all it's contents. You need to ensure both the ownership and the permissions are correct.

The commands should be of the form (where you replace [USER] with the right username):

chown -R [USER] /opt/lampp/var/mysql/ chmod -R 755 /opt/lampp/var/mysql/

| improve this answer | |
  • Thank you! It worked when I set the owner to "nobody" which apparently is the user which apache and mysql uses in XAMPP. – Niklas Sep 23 '11 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.