Can't start mysql server after macports installation

0

150213 16:12:31 mysqld_safe mysqld from pid file /opt/local/var/[hostname].local.pid ended
150213 16:21:09 mysqld_safe Starting mysqld daemon with databases from /opt/local/var
150213 16:21:09 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
150213 16:21:09 [Warning] Setting lower_case_table_names=2 because file system for /opt/local/var/ is case insensitive
150213 16:21:09 [Note] Plugin 'FEDERATED' is disabled.
150213 16:21:09 [Note] Plugin 'ndbcluster' is disabled.
/opt/local/libexec/mysqld: Table 'mysql.plugin' doesn't exist
150213 16:21:09 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
150213 16:21:09  InnoDB: Initializing buffer pool, size = 8.0M
150213 16:21:09  InnoDB: Completed initialization of buffer pool
150213 16:21:09  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 ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
150213 16:21:10 mysqld_safe mysqld from pid file /opt/local/var/[hostname].local.pid ended

It seems mysqld.sock isn't being created in /tmp, there's no symlink in /opt/local/var/run/mysql5, and I can't work out what's up with the InnoDB permissions problem. The folder & contents are user mysql, group mysql. And "mysql_upgrade" can't start the server either.

Any help appreciated!

Thanks

David Smith

Posted 2015-02-13T21:31:19.840

Reputation: 1

Answers

0

The Innodb engine is complaining that it can't create the ibdata1 file (where all the data is stored). I know you said you checked permissions, but are you positive that's the correct directory? Find your mysqld binary and issue ./mysqld --help --verbose and find the datadir variable. This directory is where the mysql user needs write access. Try that.

Safado

Posted 2015-02-13T21:31:19.840

Reputation: 250

Hi, Thanks for responding. After a few more hours of trying to troubleshoot this, I've decided to clean reinstall mysql. I hadn't updated my ports for a few years and something there seems to have broken when I did. – David Smith – 2015-02-18T20:42:28.157