0

I did an update this morning from snow leopard server to mountain lion and installed the Server app as well, now I can't connect to the mysql and I fear all my databases are lost, anyone had this problem and can provide a solution?

First issue seems to be with the mysql.sock file, it's not present. So I can't connect from anything or dump to files and start over. Here is what happends when I run mysql

/usr/libexec/mysqld
130102 17:07:48 [Warning] Setting lower_case_table_names=2 because file system for /var/mysql/ is case insensitive
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: Mutex and rw_lock use GCC atomic builtins.
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
130102 17:07:48  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...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
130102 17:07:48  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 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
130102 17:07:49  InnoDB: Started; log sequence number 0 43655
130102 17:07:49 [Note] Recovering after a crash using mysql-bin
130102 17:07:49 [Note] Starting crash recovery...
130102 17:07:49 [Note] Crash recovery finished.
130102 17:07:49 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

I've tried both mysqld_update and bunch of other stuff. My main goal now is to get the data out somehow and do a clean install. But I can't seem to find the data.

If I do a locate in the terminal on a databasename, I find it stuffed away in /Library/Server/Previous/private/var/mysql/DBNAME, but I can't access that location in either terminal or finder (even as root), trying to to cd into them gives me a "not exists" in return.

4

2 に答える 2

0

mysql データ ファイルのデフォルトの場所は次のとおりです: /usr/local/mysql/data

データ ファイルがまだ存在する場合は、それらをコピーし、mysql を再インストールしてから、データ ファイルを元の場所にコピーして戻します。100% 確実に機能するかどうかはわかりませんが、少し前に Snow Leopard で同様のトリックを実行しました...

于 2013-01-03T19:15:58.637 に答える
0

10.7 Lion 以降、MySQL はデフォルトでインストールされなくなりました。Apple には、10.7、またはあなたの場合は 10.8 にアップグレードした後の MySQL のインストールに関する技術報告があります。

于 2013-01-02T17:01:08.743 に答える