Mysql does not start with mamp

I have been using MAMP for quite some time, but a few months ago it started giving me problems. Since then, I have looked online through Google searches and the stack overflow to find permission, but I have not seen anything that could help me.

I was looking for some articles, but those that I felt would be close to helping me:

MAMP mysql not starting I'm not sure the path to my data directory? and everything that I type in the terminal seems to be returning since commmand was not found.

Mysql service will not start, InnoDB initialization function error

MAMP mysql server does not start. No mysql processes I tried to kill, but "No matching processes found."

About an hour ago, my mqsql worked, but not apache, so I found an article that says about renaming the / bin / envvars library to _envvars, apache worked at startup, but then mysql did not.

I am not getting any errors in my php log, but here are my apache and mysql logs.

Here is a snippet from the bottom of mysql error log

InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. 170118 15:52:39 InnoDB: Unable to open the first data file InnoDB: Error in opening ./ibdata1 170118 15:52:39 InnoDB: Operating system error number 35 in a file operation. InnoDB: Error number 35 means 'Resource temporarily unavailable'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html 170118 15:52:39 InnoDB: Could not open or create data files. 170118 15:52:39 InnoDB: If you tried to add new data files, and it failed here, 170118 15:52:39 InnoDB: you should now edit innodb_data_file_path in my.cnf back 170118 15:52:39 InnoDB: to what it was, and remove the new ibdata files InnoDB created 170118 15:52:39 InnoDB: in this failed attempt. InnoDB only wrote those files full of 170118 15:52:39 InnoDB: zeros, but did not yet use them in any way. But be careful: do not 170118 15:52:39 InnoDB: remove old data files which contain your precious data! 170118 15:52:39 [ERROR] Plugin 'InnoDB' init function returned error. 170118 15:52:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 170118 15:52:39 [ERROR] Unknown/unsupported storage engine: InnoDB 170118 15:52:39 [ERROR] Aborting 170118 15:52:39 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete 170118 15:52:39 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended 

and then apache error log

 [Wed Jan 18 15:48:28 2017] [notice] Digest: generating secret for digest authentication ... [Wed Jan 18 15:48:28 2017] [notice] Digest: done [Wed Jan 18 15:48:28 2017] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8zh DAV/2 PHP/5.3.6 configured -- resuming normal operations [Wed Jan 18 15:48:31 2017] [notice] caught SIGTERM, shutting down [Wed Jan 18 15:51:01 2017] [notice] Digest: generating secret for digest authentication ... [Wed Jan 18 15:51:01 2017] [notice] Digest: done [Wed Jan 18 15:51:01 2017] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8zh DAV/2 PHP/5.3.6 configured -- resuming normal operations 

My ports are apache 80 and mysql 3306.

If someone can know what might happen, that would be awesome.

+5
source share
5 answers

Back in December, when I had the same problem on my Mac, I studied a bit and found a very simple solution:

  • Exit MAMP
  • In finder, go to Applications / MAMP / db / mysql56 / and delete the last log file, in my case ib_logfile1. (It might be nice to back up this file before deleting it or, alternatively, move it to another location rather than delete it.)
  • Restart MAMP. What is it!

Some people reported that removing ib_logfile0 was also necessary, but not in my case. You can check it out on the JuanFra.me blog, where I first posted my solution last year.

I don’t know why and how this solution works, but it seems that it was useful to many others, as reported in the JuanFra blog. Hope this is useful for you too.

+1
source
  • Are you currently running another copy of MySQL / MariaDB?
  • ibdata1 in some odd file system partition?
0
source

Did you accidentally restore the backup obtained from the instance that was included?

Below are excerpts from https://dev.mysql.com/doc/refman/5.7/en/backup-types.html

Physical backup methods have the following characteristics: β€’ Backups can be performed while the MySQL server is not running. If the server is running, you must perform an appropriate lock so that the server does not modify the contents of the database during the backup. MySQL Enterprise Backup makes this lock automatically for tables that require it.

0
source

To stop MySQL There are different cases depending on whether MySQL is installed with the official binary installer, using MacPorts or using Homebrew: MacPorts

 sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql.plist sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql.plist 

Note. This happens after a reboot. Homebrew

 launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist 

Binary installer

 sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop sudo /Library/StartupItems/MySQLCOM/MySQLCOM start sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart 
0
source

If MySQL does not start, it is likely that it may already be running. You can very easily manually disable it in the terminal.

This has happened to me several times with me, and I believe that this is due to the fact that MAMP did not turn off correctly.

  • Exit MAMP.
  • Open a terminal and type: killall -9 mysqld
  • Restart MAMP.
0
source

Source: https://habr.com/ru/post/1263025/


All Articles