MySQL Server kann bei der Installation von Fresh MAMP nicht gestartet werden

5441
alexpelan

Ich verwende Mac OS X 10.6.2 auf meinem Macbook Pro.

Ich kann den Apache-Server zum Starten bringen, aber nicht den MySQL-Server, sowohl auf den Standard-Apache-Ports als auch auf den Standard-MAMP-Ports. Wenn ich versuche, auf meine Startseite zu gelangen, erhalte ich die Meldung "Fehler: Verbindung zum MySQL-Server konnte nicht hergestellt werden!" . Was ist in meinem MySQL-Fehlerprotokoll:

00513 02:00:07 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended 100513 02:00:16 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql 100513 2:00:16 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in a future release. Please use '--slow_query_log'/'--slow_query_log_file' instead. 100513 2:00:16 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive. This means that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2 100513 2:00:16 [Warning] One can only use the --user switch if running as root 100513 2:00:16 [Note] Plugin 'FEDERATED' is disabled. 100513 2:00:16 [Note] Plugin 'ndbcluster' is disabled. InnoDB: Error: log file /usr/local/mysql/data/ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 16777216 bytes! 100513 2:00:16 [ERROR] Plugin 'InnoDB' init function returned error. 100513 2:00:16 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 100513 2:00:16 [ERROR] /Applications/MAMP/Library/libexec/mysqld: unknown option '--skip-bdb' 100513 2:00:16 [ERROR] Aborting 100513 2:00:16 [Note] /Applications/MAMP/Library/libexec/mysqld: Shutdown complete 100513 02:00:16 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended 

Einige Sachen:

1) Es gibt eine Reihe verschiedener .cnf-Dateien, die mit MAMP geliefert werden (my-huge, my-medium usw.) ... wie kann ich feststellen, welche tatsächlich verwendet wird?
2) Ich habe die Dateien ib_logfile0 und ib_logfile1 gelöscht, wie von einem anderen Post auf serverfault empfohlen, und am Ende wurden weitere Fehler angezeigt:

100519 16:01:30 InnoDB: Log file /usr/local/mysql/data/ib_logfile0 did not exist: new to be created InnoDB: Setting log file /usr/local/mysql/data/ib_logfile0 size to 16 MB InnoDB: Database physically writes the file full: wait... 100519 16:01:30 InnoDB: Log file /usr/local/mysql/data/ib_logfile1 did not exist: new to be created InnoDB: Setting log file /usr/local/mysql/data/ib_logfile1 size to 16 MB InnoDB: Database physically writes the file full: wait... InnoDB: The log sequence number in ibdata files does not match InnoDB: the log sequence number in the ib_logfiles! 100519 16:01:31 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 100519 16:01:31 InnoDB: Started; log sequence number 0 44556 100519 16:01:31 [ERROR] /Applications/MAMP/Library/libexec/mysqld: unknown option '--skip-bdb' 100519 16:01:31 [ERROR] Aborting 

Und dann bekam ich das nächste Mal, als ich versuchte, es auszuführen:

InnoDB: Unable to lock /usr/local/mysql/data/ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process  InnoDB: using the same InnoDB data or log files. 

Entschuldigung, dass dies viele Informationen sind, aber ich möchte nichts auslassen. Vielen Dank.

2
mysqld ist das Skript, mit dem der Server gestartet wird, richtig? '--skip -bdb' befindet sich nicht in meiner my.cnf-Datei, also denke ich, dass MAMP denkt, dass es eine andere my.cnf-Datei gibt, die sich aber nicht in meiner Suche befindet. alexpelan vor 13 Jahren 0

2 Antworten auf die Frage

1
Sergey

Ich hatte ein ähnliches Problem und bemerkte, dass mysql nach einem Neustart des Computers nicht mehr startet. Als ich MAMP beendet hatte und dann versuchte, es erneut zu starten, wird nur Apache gestartet.

Der 'Fix', der für mich funktioniert hat, ist, MAMP zu beenden, den Aktivitätsmonitor zu verwenden, um alle Instanzen von 'mysqld' zu beenden, und dann MAMP neu zu starten.

1
drewrockshard

Das klingt definitiv so, als hätten Sie viele MySQL-Prozesse ausgeführt und Sie müssen nur alle MySQL-Prozesse beenden und dann MySQL starten. Öffne dein Terminal und gib Folgendes aus:

kill -s 15 `http://softwaregravy.wordpress.com/2010/10/16/ls-colors-for-mac/` 

Bestätigen mit:

ps -ef | grep mysql | grep -v grep 

Wenn immer noch Prozesse auftauchen, müssen Sie alle Prozesse erzwingen:

kill -s 9 `http://softwaregravy.wordpress.com/2010/10/16/ls-colors-for-mac/` 

Bestätigen Sie und starten Sie MySQL wie gewohnt über das Bedienfeld von MAMP.