2

So here's the details on what has happened and what I've done:

  1. For some unknown reason, mysql did not start on my MAMP. I tried reinstalling MAMP and this command based on a web search:

    killall -9 mysqld

but it didn't work for me.

  1. According to this post on stackoverflow, I deleted some files and it made mysql run again in MAMP: enter image description here

  2. I could go to PHPMyAdmin again and it did list my databases: enter image description here

  3. However, when I clicked on each of them, it gave me an error mentioning that

No tables found in database

enter image description here

  1. And when I clicked on each table, it gave the error that:

No partitioning defined.

enter image description here

  1. Then again I searched the web and came across this command to fix the issue:

    chown -R mysql.mysql /var/lib/mysql/

But it gives me this error:

chown: mysql.mysql: illegal user name

Any suggestions or solutions? The databases belong to Wordpress websites.

Community
  • 1
  • 1
Milad
  • 1,239
  • 3
  • 19
  • 37
  • 1
    what is the username? – WEBjuju Dec 06 '16 at 13:07
  • @WEBjuju You mean, I should try the username on my system instead of mysql.mysql?? like: chown -R USERNAME.USERNAME /var/lib/mysql/ – Milad Dec 06 '16 at 13:09
  • have a look on [this](http://arstechnica.com/civis/viewtopic.php?f=16&t=762045) or [here](https://forums.freebsd.org/threads/43934/#post-244362) – Blueblazer172 Dec 06 '16 at 13:11
  • @Blueblazer172 I get errors like: -bash: groupadd: command not found and similar ones – Milad Dec 06 '16 at 13:18
  • @WEBjuju it gives erros: `chown: mysql: No such file or directory` `chown: /var/lib/mysql/: No such file or directory` – Milad Dec 06 '16 at 13:19
  • i guess you are logged in as user `mysql` – Blueblazer172 Dec 06 '16 at 13:21
  • 2
    according to your screenshot of where your mysql56 folder is, your command should be `chown -R mysql:mysql /Applications/MAMP/db/mysql56` – WEBjuju Dec 06 '16 at 14:18
  • please note the command parameter for `user:group` is colon separated. – WEBjuju Dec 06 '16 at 14:19
  • @WEBjuju how do I know what the username and group is exactly? as Admin a group? – Milad Dec 10 '16 at 17:33
  • What does the MySQL log say when trying to start? What did it say before you deleted those files? – Isaac Bennetch Dec 12 '16 at 18:25
  • In most cases, the ibdata1 file contains information essential to the proper operation of your database. While the problem certain could be bad permissions as suggested in the comments, it seems very likely that when you removed the ibdata1, ib_logfile0, and ib_logfile1 files you basically corrupted your database. – Isaac Bennetch Dec 12 '16 at 18:25

0 Answers0