MySQL backup@20150623
まず何をどうするかも不明なので調べ・・
http://satsumahomeserver.com/blog/3612
を参照
まず環境変数でINSTALL_DIR としてパスを通しコマンド実行
- C:\BitNami\redmine-2.6.1-0
- C:\BitNami\redmine-2.6.1-0\mysql\bin>mysqldump ?u root ?p bitnami_redmine > backup.sql
>が不明と返される・・ので調べると
http://chunye.seesaa.net/article/418976383.html
を参照
これは > が > に文字化けしているようで
- C:\BitNami\redmine-2.6.1-0\mysql\bin>mysqldump -u root -p bitnami_redmine > backup.sql
- mysqldump:Got error: 1045: Access denied for user 'admin'@'localhost' (using password: YES) when trying to connect
パスワードが間違っていると出てくる。おそらく、mysql の root ユーザーのパスワードが違うのでしょう。
http://mysql.javarou.com/
を調べると
コマンドラインから MySQL に接続しPWが間違っているか確認して見る
mysql -u ユーザー名 -D データベース名 -p
- C:\BitNami\redmine-2.6.1-0\mysql\bin>mysql -u root -D bitnami_redmine -p
- Enter password: ***********
- Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.19 -community-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql>SHOW DATABASES;
mysql> SHOW TABLES FROM test;
mysql> \q
Bye
MySQLへのrootログオンは正常、PWも正しい、ことが判明
Windows, binのフォルダがrootで書き込み不可と思いユーザ登録して見る
[ローカルユーザとグループ(ローカル)\グループ]でUsersにroot追加
変わらず
http://stackoverflow.com/questions/20059823/mysqldump-error-1045-access-denied-despite-correct-passwords-etc
を調べると
-hでホスト名、-Pでportなどspecifyと書いてある。
* mysqldump -h hostname -u username -P port -B database --no-create-info -p > output.sql
I think you should specify the args
でホスト名とポート番号を指定
- mysqldump -h ホスト名 -u root -P 9306 -B bitnami_redmine -p >backup.sql
- Enter password: ***********
- mysqldump:Got error: 2003: Can't connect to MySQL server on 'ホスト名' (10061) when trying to connect
ホストに接続できないと言われ、従いホスト名は削って
- cd C:\BitNami\redmine-2.6.1-0\mysql\bin mysqldump -u root -P 9306 -B bitnami_redmine -p >backup.sql
- Enter password:***********
・・でbackup.sql正常作成された。 →^_^;