コマンドラインからmysqlサーバーをシャットダウンしたい。
または強制的に使用taskkill.exe
すると、mysqlサーバーが停止しますが、mysqlを再度起動すると。それが示している
2013-08-31 16:00:35 3940 [Note] InnoDB: Database was not shutdown normally!
2013-08-31 16:00:35 3940 [Note] InnoDB: Starting crash recovery.
2013-08-31 16:00:35 3940 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-08-31 16:00:35 3940 [Note] InnoDB: Restoring possible half-written data pages
2013-08-31 16:00:35 3940 [Note] InnoDB: from the doublewrite buffer...
2013-08-31 16:00:35 3940 [Note] InnoDB: 128 rollback segment(s) are active.
2013-08-31 16:00:35 3940 [Note] InnoDB: Waiting for purge to start
2013-08-31 16:00:35 3940 [Note] InnoDB: 5.6.13 started; log sequence number 1600927
2013-08-31 16:00:35 3940 [Note] Recovering after a crash using mysql-bin
2013-08-31 16:00:35 3940 [Note] Starting crash recovery...
2013-08-31 16:00:35 3940 [Note] Crash recovery finished.
復旧には、実際にはサーバーの起動に時間がかかります。また、データベースが非常に大きい場合、起動に失敗することもあります。
だから私は通常のようにシャットダウンしたい:
mysqladmin -u root -pmysql shutdown
上記のコマンドは機能しますが、MySQL ルート パスワードが変更される可能性があるため、 Windows 用に以下の Mac OS Xの同様のコマンドが必要です。
mysqladmin -u root -p$(cat /path/to/mysql/root/password) shutdown
基本的に、ファイルからパスワードを読み取りたいです。DOSで可能ですか?
助けはありますか?ありがとう。