MYSQL Problem: mysql Daten [data] von Windows auf Mac Tiger

Hi,

maceis meinte, daß Terminal-Fenster in dem Du den MySQL-Server gestartet hast, dieses Fenster darfst Du nicht schließen. Außer Du arbeitest wie maceis geschrieben hat mit "&" dann läuft der Prozeß im Hintergrund.

Viele Grüße
Michael
 
ok danke!

Oehm maceis, bin mir nicht sicher woher du schliesst, dass ich MySQL nicht neuinstalliert habe. Etwa wegen dem Datum der Files!? Denn die Files haben [so wars bei Windoof - korrigier mich wenns bei Mac anders ist] das Datum wann die Files erstellt worden sind.
Sprich das MySQL Packet wurde im Mai erstellt.
Ich habe meinem Mac erst seit mitte Juni ...
 
mhh [sry fuer den doppel post] hab jetzt einfach mal anstatt -user=mysql --user=root verwendet. Er restartet die DB, kann dann aber nicht den User mysql benutzen? Ist das richtig?

book:~ maltespielberger$ sudo /usr/local/mysql/bin/mysqld --user=root050703 15:54:17 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
050703 15:54:17 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...
050703 15:54:17 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 36808.
InnoDB: Doing recovery: scanned up to log sequence number 0 43634
050703 15:54:17 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
050703 15:54:18 InnoDB: Flushing modified pages from the buffer pool...
050703 15:54:18 InnoDB: Started; log sequence number 0 43634
050703 15:54:18 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist

oder tut das gar nichts zur sache und ich mach nur unfug?
 
mikne21 schrieb:
...
maceis meinte, daß Terminal-Fenster in dem Du den MySQL-Server gestartet hast, dieses Fenster darfst Du nicht schließen. Außer Du arbeitest wie maceis geschrieben hat mit "&" dann läuft der Prozeß im Hintergrund.
...
Das ist leider nicht ganz korrekt.
Wenn Du eine Shell beendest (z. B. das Terminalfenster schließt) werden alle Kindprozesse dieser Shell beendet, also auch die Hintergrundprozesse.

Der Vorteil des & ist lediglich, dass Du einen Prompt in der selben Shell erhältst.

asylum schrieb:
Oehm maceis, bin mir nicht sicher woher du schliesst, dass ich MySQL nicht neuinstalliert habe. Etwa wegen dem Datum der Files!? Denn die Files haben [so wars bei Windoof - korrigier mich wenns bei Mac anders ist] das Datum wann die Files erstellt worden sind.
...
Es werden hier die Daten der letzten Änderung angezeigt.
Mich wundert aber vor allem der Eigentümer des data Verzeichnisses.
Der sollte nach einer Neuinstallation "mysql" und nicht "root" sein.
Würde mich sehr wundern, wenn das so erstellt wird.
Um den Inhalt des data Verzeichnisses zu listen kannst Du (bei fehlenden Rechten) auch
sudo ls -l /usr/local/mysql/data/
verwenden.

asylum schrieb:
...
hab jetzt einfach mal anstatt -user=mysql --user=root
auah - großese Sicherheitsrisiko!

Bitte lösche nochmal alles (mit remove_old_mysql.sh), mach dann zur Kontrolle ein "ls -l /usr/local/" (posten).
Installiere dann neu und mach ein "ls -l /usr/local/mysql/" (posten) bevor Du irgendetwas anderes machst.
Poste auch mal, wie die genaue Version ist, die Du installierst.

HTH
 
-deinstalliert
-"ls -l /usr/local/"
ibook:~ maltespielberger$ ls -l /usr/local/
ibook:~ maltespielberger$
-mysql-standard-4.1.12-apple-darwin6.8-powerpc
-"ls -l /usr/local/mysql/"
total 96
-rw-r--r-- 1 root wheel 19071 May 10 22:57 COPYING
-rw-r--r-- 1 root wheel 5164 May 11 09:04 EXCEPTIONS-CLIENT
-rw-r--r-- 1 root wheel 8338 May 11 09:04 INSTALL-BINARY
-rw-r--r-- 1 root wheel 1937 May 10 22:57 README
drwxr-xr-x 55 root wheel 1870 May 11 09:26 bin
-rwxr-xr-x 1 root wheel 801 May 11 09:26 configure
drwxr-x--- 4 root wheel 136 May 11 09:26 data
drwxr-xr-x 5 root wheel 170 May 11 09:26 docs
drwxr-xr-x 61 root wheel 2074 May 11 09:26 include
drwxr-xr-x 10 root wheel 340 May 11 09:26 lib
drwxr-xr-x 3 root wheel 102 May 11 09:26 man
drwxr-xr-x 12 root wheel 408 May 11 09:26 mysql-test
drwxr-xr-x 3 root wheel 102 May 11 09:26 scripts
drwxr-xr-x 5 root wheel 170 May 11 09:26 share
drwxr-xr-x 31 root wheel 1054 May 11 09:26 sql-bench
drwxr-xr-x 14 root wheel 476 May 11 09:26 support-files
drwxr-xr-x 21 root wheel 714 May 11 09:26 tests
 
Okay.
Das sieht erstmal nicht gut aus.
Könnte evtl. sogar ein bug sein.

Mach jetzt folgendes:
sudo chown -R mysql:wheel /usr/local/mysql/data
und versuche nochmal den Server zu starten.

BTW:
Warum installierst Du die Jaguar Version?
Hast Du OS X 10.2?
 
hast recht ist mir gar nicht aufgefallen!
Habe mir anfangs die 10.3 Version runtergeladen, diese dann aber irgendwann vom Mac geloescht und mir dann ausversehen die 10.2 geladen.

Hab jetzt die 10.3er installiert und jetzt ist u.a. der Data Ordner mit richtigem Datum:
total 96
-rw-r--r-- 1 root wheel 19071 May 10 22:57 COPYING
-rw-r--r-- 1 root wheel 5164 May 11 09:04 EXCEPTIONS-CLIENT
-rw-r--r-- 1 root wheel 8338 May 11 09:04 INSTALL-BINARY
-rw-r--r-- 1 root wheel 1937 May 10 22:57 README
drwxr-xr-x 55 root wheel 1870 May 11 09:21 bin
-rwxr-xr-x 1 root wheel 801 May 11 09:21 configure
drwxr-x--- 4 root wheel 136 Jul 3 19:44 data
drwxr-xr-x 5 root wheel 170 May 11 09:21 docs
drwxr-xr-x 61 root wheel 2074 May 11 09:21 include
drwxr-xr-x 10 root wheel 340 May 11 09:21 lib
drwxr-xr-x 3 root wheel 102 May 11 09:21 man
drwxr-xr-x 12 root wheel 408 May 11 09:21 mysql-test
drwxr-xr-x 3 root wheel 102 May 11 09:21 scripts
drwxr-xr-x 5 root wheel 170 May 11 09:21 share
drwxr-xr-x 31 root wheel 1054 May 11 09:21 sql-bench
drwxr-xr-x 14 root wheel 476 May 11 09:21 support-files
drwxr-xr-x 21 root wheel 714 May 11 09:21 tests

dennoch:
ibook:~ maltespielberger$ sudo /usr/local/mysql/bin/mysqld --user=mysql
Password:
050703 19:44:04 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc/data/ is case insensitive
050703 19:44:04 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.
 
Und immer noich ist root Eigentümer von data:
drwxr-x--- 4 root wheel 136 Jul 3 19:44 data
also wieder:
sudo chown -R mysql:wheel /usr/local/mysql/data
 
ah! Das macht der Befehl :)

drwxr-x--- 7 mysql wheel 238 Jul 3 19:48 data

wenn ich nun MySQL starten will, erhalte ich am Ende folgendes:

050703 20:09:07 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
 
Gut.
Dann versuch jetzt mal folgendes:
sudo /usr/local/mysql/scripts/mysql_install_db
Und dann nochmal starten (wäre hilfreich, wenn Du immer die genauen Kommandos postest, die Du ausführst, dann kann ich das besser nachvollziehen)
 
Der Befehl eben, war der --user=mysql

----

sudo /usr/local/mysql/scripts/mysql_install_db
Password:
Could not find help file 'fill_help_tables.sql' in ./support-files or inside ..
 
Dann versuch es so:
cd /usr/local/mysql
sudo ./scripts/mysql_install_db

Das müsste eigentlich klappen.
 
ibook:/usr/local/mysql maltespielberger$ sudo ./scripts/mysql_install_db
Installing all prepared tables
050703 21:00:26 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc/data/ is case insensitive
Fill help tables

050703 21:00:27 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc/data/ is case insensitive

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h ibook.local password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
ibook:/usr/local/mysql maltespielberger$
und dann
ibook:/usr/local/mysql maltespielberger$ sudo /usr/local/mysql/bin/mysqld --user=mysql
050703 21:01:39 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc/data/ is case insensitive
050703 21:01:39 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...
050703 21:01:39 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43634.
InnoDB: Doing recovery: scanned up to log sequence number 0 43634
050703 21:01:40 InnoDB: Flushing modified pages from the buffer pool...
050703 21:01:40 InnoDB: Started; log sequence number 0 43634
050703 21:01:40 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
050703 21:01:40 [ERROR] Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
ibook:/usr/local/mysql maltespielberger$
 
Versuch mal mit
cd /usr/local/mysql && sudo ./bin/mysqld_safe &
 
ibook:~ maltespielberger$ cd /usr/local/mysql && sudo ./bin/mysqld_safe &
[1] 5664
ibook:~ maltespielberger$ Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/ibook.local.pid
050703 21:11:52 mysqld ended

danach neustart [von mir]

ibook:~ maltespielberger$ sudo /usr/local/mysql/bin/mysqld --user=mysql
050703 21:12:14 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-standard-4.1.12-apple-darwin7.9.0-powerpc/data/ is case insensitive
050703 21:12:14 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...
050703 21:12:14 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43634.
InnoDB: Doing recovery: scanned up to log sequence number 0 43634
050703 21:12:15 InnoDB: Flushing modified pages from the buffer pool...
050703 21:12:15 InnoDB: Started; log sequence number 0 43634
050703 21:12:15 [ERROR] /usr/local/mysql/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
050703 21:12:15 [ERROR] Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
[1]+ Done cd /usr/local/mysql && sudo ./bin/mysqld_safe
ibook:~ maltespielberger$
 
Zuletzt bearbeitet:
Irgendwas machst Du falsch!

Ich hab jetzt mal auf meinem iBook MySQl gelöscht, MySQL Installer package (Mac OS X v10.3) Standard 4.1.12 24.1M heruntergeladen und installiert.

Alles wird sofort mit den richtigen Rechten installiert und kann ohne jede weitere Maßnahme sofort und ohne Fehlermeldungen gestartet werden.

Von diesem Punkt an könnte ich nur noch mit Shellzugriff (übers Internet) auf Deinen Rechner helfen (mit admin Rechten).
 
Zuletzt bearbeitet von einem Moderator:
mhh, wie waers denn wenn du mir ne trocken Uebung gibst (naja machst du ja eigentlich hier schon die ganze Zeit). Also einfach mal alle noetigen Befehle hintereinander weghauen und evtl wie die letzte Zeile o.a. aussehen sollte.

Achja! Ich hab immer noch keine mysql.sock datei ...

Wie kann ich denn den mysql User loeschen, oder wird er bei der Deinstallation von MySQL geloescht?!
Ist die mysql.sock auf jeden Rechner individuell zugeschnitten (was is das eigentlich genau?!)?!

ob es an der mysql Version liegt?
 
asylum schrieb:
...Also einfach mal alle noetigen Befehle hintereinander weghauen und evtl wie die letzte Zeile o.a. aussehen sollte.
...
Hab ich doch schon mehrmals:
Altes MySQL mit remove_old_mysql.sh löschen.
MySQl neu installieren.
Dann mit cd /usr/local/mysql ins mysql Verzeichnis wechseln.
Dann Server mit sudo ./bin/mysqld_safe& starten
Die Ausgabe sollte so aussehen:
Starting mysqld daemon with databases from /usr/local/mysql/data
Sonst nix!

asylum schrieb:
...
Achja! Ich hab immer noch keine mysql.sock datei ...
Klar, die wird ja erst beim erfolgreichen Starten von MySQl erstellt.

asylum schrieb:
...
Wie kann ich denn den mysql User loeschen
Wozu?
Dann sind die Dateien ja herrenlos, und Du hast keine Benutzer mit dessen Privilegien der Server gestartet werden kann oder die Installation schlägt gleich fehl
asylum schrieb:
...
, oder wird er bei der Deinstallation von MySQL geloescht?!
Nein, der ist immer da - auch ohne MySQl.
asylum schrieb:
...ob es an der mysql Version liegt?
Nein.
 
oeh jetzt versteh ich nix mehr :(

ibook:/usr/local/mysql maltespielberger$ cd /usr/local/mysql
ibook:/usr/local/mysql maltespielberger$ sudo ./bin/mysqld_safe&
[1] 1706

? was soll die [1] und dann die zahl??

Wenn ich jedoch den anderen start Befehl verwende:

ibook:/usr/local/mysql maltespielberger$ sudo /usr/local/mysql/bin/mysqld --user=mysql
Password:
050704 14:15:59 Warning: Setting lower_case_table_names=2 because file system for /usr/local/mysql-standard-4.0.25-apple-darwin7.9.0-powerpc/data/ is case insensitive
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
050704 14:16:00 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
050704 14:16:00 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
050704 14:16:01 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
050704 14:16:02 InnoDB: Started
050704 14:16:02 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
050704 14:16:02 Aborting

050704 14:16:02 InnoDB: Starting shutdown...
050704 14:16:04 InnoDB: Shutdown completed
050704 14:16:04 /usr/local/mysql/bin/mysqld: Shutdown Complete

ibook:/usr/local/mysql maltespielberger$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Hab mal n bissl gegoogelt und da meinten User, dass wohl an dem mysql User etwas nicht stimmt (die Rechte oder was weiss ich).
Wie setze ich denn die Rechte richtig oder erstelle den Mysql User?

Mit chown -R mysql:mysql bekomm ich nur ne antwort ueber die usage von chown ...

Gruss
 
so ... jetzt geht alles
ich habe mir von softpedia den 'Complete MySQL 4.0.15' geladen und jetzt funktioniert alles und ich bin zufrieden!

Danke trotzdem fuer deine unermuetliche Hilfe maceis!

Gruss

Asylums
 
Zurück
Oben Unten