Also habe ich viele Nachbehandlungen dieses speziellen Problems durchlaufen, aber keine der Antworten scheint für meinen Fall zu funktionieren.
Das ist also der Prozess: Ich habe mysql über Homebrew installiert, was mich zu folgendem geführt hat:
Marjorie:~ Mawel$ brew install mysql
==> Downloading https://homebrew.bintray.com/bottles/mysql-5.7.11.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/mysql-5.7.11.mavericks.bottle.tar.gz
==> Pouring mysql-5.7.11.mavericks.bottle.tar.gz
==> /usr/local/Cellar/mysql/5.7.11/bin/mysqld --initialize-insecure --user=Mawel --basedir=/usr/local/Cellar/mysql/5.7.11 --d
Last 15 lines from /Users/Mawel/Library/Logs/Homebrew/mysql/01.mysqld:
2016-04-03 22:00:14 +0200
/usr/local/Cellar/mysql/5.7.11/bin/mysqld
--initialize-insecure
--user=Mawel
--basedir=/usr/local/Cellar/mysql/5.7.11
--datadir=/usr/local/var/mysql
--tmpdir=/tmp
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mysql`
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
To connect run:
mysql -uroot
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To load mysql:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
Ich habe es versuchtmysql.server start
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Marjorie.local.pid).
Ich habe nach der Datei gesucht, aber der übergeordnete Ordner war leer:
Marjorie:mysql Mawel$ cd /usr/local/var/mysql/
Marjorie:mysql Mawel$ ls -all
total 0
drwxr-xr-x 2 Mawel admin 68 Apr 3 22:27 .
drwxr-xr-x 5 Mawel admin 170 Apr 3 22:00 ..
Ich habe dann gesehen
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mysql`
Also führe ich es aus, nachdem ich Zugriff darauf gegeben habe.
Marjorie:etc Mawel$ brew postinstall mysql
==> /usr/local/Cellar/mysql/5.7.11/bin/mysqld --initialize-insecure --user=Mawel --basedir=/usr/local/Cellar/mysql/5.7.11 --d
Last 15 lines from /Users/Mawel/Library/Logs/Homebrew/mysql/01.mysqld:
2016-04-03 22:24:00 +0200
/usr/local/Cellar/mysql/5.7.11/bin/mysqld
--initialize-insecure
--user=Mawel
--basedir=/usr/local/Cellar/mysql/5.7.11
--datadir=/usr/local/var/mysql
--tmpdir=/tmp
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues
Immer noch keine Änderung anmysql.server start
Jeder kann mir helfen, ich weiß wirklich nicht mehr weiter :/
Als Plus: hier ist my.conf (soll ich es bearbeiten?)
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
# CUSTOMIZED BY MMVMySQL SCRIPT - JUST GENERIC SETTINGS
# DO NOT TREAT AS GOSPEL
innodb_buffer_pool_size=2G
skip-name_resolve
max-connect-errors=100000
max-connections=500
#
# The MySQL database server configuration file.
#
"my.cnf" [readonly] 170 lines, 4719 characters
Also habe ich mich nach dem Klanomath- Vorschlag entschieden, alle meine MySQL-Dateien zu bereinigen und gleichzeitig MAMP und MAMPPro zu entfernen, da sie widersprüchlich sein könnten.
Erster Schritt :
Marjorie:mysql Mawel$ brew uninstall mysql
Uninstalling /usr/local/Cellar/mysql/5.7.11... (12,817 files, 440.5M)
Dann rannte ich sudo find / -name mysql
und beschloss, alles zu reinigen:
/Applications/MAMP/db/mysql
/Applications/MAMP/db/mysql/mysql
/Applications/MAMP/Library/bin/mysql
/Applications/MAMP/Library/lib/perl5/site_perl/5.22.0/darwin-2level/auto/DBD/mysql
/Applications/MAMP/Library/lib/perl5/site_perl/5.22.0/darwin-2level/DBD/mysql
/Applications/MAMP/Library/lib/python2.7/site-packages/mysql
/Applications/MAMP/tmp/mysql
find: ‘/dev/fd/3’: Not a directory
find: File system loop detected; ‘/dev/fd/4’ is part of the same file system loop as ‘/dev/fd’.
find: File system loop detected; ‘/dev/fd/5’ is part of the same file system loop as ‘/dev’.
find: File system loop detected; ‘/dev/fd/6’ is part of the same file system loop as ‘/dev/fd’.
find: ‘/dev/fd/7’: Not a directory
find: ‘/dev/fd/8’: Not a directory
/Library/Application Support/appsolute/MAMP PRO/db/mysql
/Library/Application Support/appsolute/MAMP PRO/db/mysql/mysql
/private/var/mysql
/Users/Mawel/Library/Logs/Homebrew/mysql
/usr/local/var/mysql
Ich habe das hart aufgeräumt und damit fertig:
Marjorie:/ Mawel$ sudo find / -name mysql
find: ‘/dev/fd/3’: Not a directory
find: File system loop detected; ‘/dev/fd/4’ is part of the same file system loop as ‘/dev/fd’.
find: File system loop detected; ‘/dev/fd/5’ is part of the same file system loop as ‘/dev’.
find: File system loop detected; ‘/dev/fd/6’ is part of the same file system loop as ‘/dev/fd’.
find: ‘/dev/fd/7’: Not a directory
find: ‘/dev/fd/8’: Not a directory
Und endlich bin ich wieder gelaufenbrew install mysql
Und es kam das gleiche Problem:
Warnung: Der Schritt nach der Installation wurde nicht erfolgreich abgeschlossen. Sie können es erneut versuchen
brew postinstall mysql
Und wieder dasselbe Schema.
Die Installation von Homebrew mysql (oder besser: die Initialisierung) ist fehlgeschlagen. Das Hauptdatenverzeichnis ist leer. Normalerweise sieht das Datenverzeichnis nach einer Neuinstallation so aus:
drwxr-xr-x 18 user admin - 612 4 Apr 04:04 .
drwxr-xr-x 3 user admin - 102 4 Apr 04:04 ..
-rw-r----- 1 user admin - 56 4 Apr 04:04 auto.cnf
-rw------- 1 user admin - 1680 4 Apr 04:04 ca-key.pem
-rw-r--r-- 1 user admin - 1075 4 Apr 04:04 ca.pem
-rw-r--r-- 1 user admin - 1079 4 Apr 04:04 client-cert.pem
-rw------- 1 user admin - 1680 4 Apr 04:04 client-key.pem
-rw-r----- 1 user admin - 407 4 Apr 04:04 ib_buffer_pool
-rw-r----- 1 user admin - 50331648 4 Apr 04:04 ib_logfile0
-rw-r----- 1 user admin - 50331648 4 Apr 04:04 ib_logfile1
-rw-r----- 1 user admin - 12582912 4 Apr 04:04 ibdata1
drwxr-x--- 77 user admin - 2618 4 Apr 04:04 mysql
drwxr-x--- 90 user admin - 3060 4 Apr 04:04 performance_schema
-rw------- 1 user admin - 1680 4 Apr 04:04 private_key.pem
-rw-r--r-- 1 user admin - 452 4 Apr 04:04 public_key.pem
-rw-r--r-- 1 user admin - 1079 4 Apr 04:04 server-cert.pem
-rw------- 1 user admin - 1680 4 Apr 04:04 server-key.pem
drwxr-x--- 108 user admin - 3672 4 Apr 04:04 sys
Daher ist es kein Wunder, dass dies mysql.server start
fehlschlägt (oder mysql nicht stoppt), da weder /usr/local/var/mysql/Marjorie.local.pid noch eine andere erforderliche Datei vorhanden ist.
Wahrscheinlich haben Sie irgendwo eine ältere mysql-Installation oder eine alte Konfigurationsdatei oder mysql läuft sogar noch. Entfernen Sie alle mysql-bezogenen Dateien, nachdem Sie eine aktuelle Datenbank gesichert oder Konfigurationsdateien gesichert/umbenannt haben. Vergessen Sie nicht, alte mysql StartUp-Elemente zu entfernen oder Daemons und/oder Agenten auch in ~/Library/LaunchAgents zu starten!
Oracle MySQL deinstallieren: Wie kann ich MySQL aus der manuellen Installationsversion entfernen?
Deinstallieren Sie MAMP/MAMP Pro: Entfernen Sie den Ordner MAMP und MAMP Pro
Deinstallieren Sie auch Homebrew mysql. Installieren Sie dann Homebrew MySQL von Grund auf neu.
Baldráni
rm -rf mysql*
(im Grunde)Baldráni
sudo find / -name mysql
? Die meisten von ihnen stammen von MAMP. Gibt es kein pb, das sie entfernt?klanomath
brew uninstall mysql
. Ich empfehle die Verwendung für andere ältere Installationen nicht,rm ... mysql*
wenn Sie nicht genau wissen, was Sie tun. Link zum Deinstallieren von Oracle mysqlBaldráni
klanomath
Baldráni
klanomath
sudo chown -R $(whoami) /usr/local
. Dann Homebrew/mysql neu installieren. Es kann ausreichen, nur mysql zu deinstallieren.Baldráni
klanomath