mysql:11862
From: 福田 晃章 <福田 晃章 <t.fukuta@xxxxxxxxxx>>
Date: Tue, 2 Aug 2005 18:47:35 +0900
Subject: [mysql 11862] Re: mysqldumpについて
遠藤さん。早速の回答ありがとうございます。
教えて頂いた通りに試したのですが、DBがリストア
されていないです。
rootでMySQLを起動して、use gyoumudb[Enter]
すると、DBがありませんというメッセージを出します。
私のやり方が悪かったのでしょうか?
次にDOSプロンプトの結果を掲載します。
以下長文で申し訳ありません。
-------------------------------------------------------------
C:\mysql\bin>mysql -u root gyoumudb < C:\work\aaa.txt
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
↑コメント追加:ファイル名を変更しましたが、基本的に指示通り行いました。
↓コメント追加:パスワードを追加しました。すると長いメッセージが出ました。
C:\mysql\bin>mysql -u root gyoumudb dbuser < C:\work\aaa.txt
mysql Ver 11.16 Distrib 3.23.49, for Win95/Win98 (i32)
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Usage: mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-A, --no-auto-rehash No automatic rehashing. One has to use 'rehash' to
get table and field completion. This gives a quicker
start of mysql and disables rehashing on reconnect.
-B, --batch Print results with a tab as separator, each row on
a new line. Doesn't use history file.
--character-sets-dir=...
Directory where character sets are located.
-C, --compress Use compression in server/client protocol.
-D, --database=.. Database to use.
--default-character-set=...
Set the default character set.
-e, --execute=... Execute command and quit. (Output like with --batch)
-E, --vertical Print the output of a query (rows) vertically.
-f, --force Continue even if we get an sql error.
-g, --no-named-commands
Named commands are disabled. Use \* form only, or
use named commands only in the beginning of a line
ending with a semicolon (;) Since version 10.9 the
client now starts with this option ENABLED by
default! Disable with '-G'. Long format commands
still work from the first line.
-G, --enable-named-commands
Named commands are enabled. Opposite to -g.
-i, --ignore-space Ignore space after function names.
-h, --host=... Connect to host.
-H, --html Produce HTML output.
-L, --skip-line-numbers
Don't write line number for errors.
--no-tee Disable outfile. See interactive help (\h) also.
-n, --unbuffered Flush buffer after each query.
-N, --skip-column-names
Don't write column names in results.
-O, --set-variable var=option
Give a variable an value. --help lists variables.
-o, --one-database Only update the default database. This is useful
for skipping updates to other database in the update
log.
-p[password], --password[=...]
Password to use when connecting to server
If password is not given it's asked from the tty.
-W, --pipe Use named pipes to connect to server
-P, --port=... Port number to use for connection.
-q, --quick Don't cache result, print it row by row. This may
slow down the server if the output is suspended.
Doesn't use history file.
-r, --raw Write fields without conversion. Used with --batch
-s, --silent Be more silent.
-S --socket=... Socket file to use for connection.
-t, --table Output in table format.
-T, --debug-info Print some debug info at exit.
--tee=... Append everything into outfile. See interactive help
(\h) also. Does not work in batch mode.
-u, --user=# User for login if not current user.
-U, --safe-updates[=#], --i-am-a-dummy[=#]
Only allow UPDATE and DELETE that uses keys.
-v, --verbose Write more. (-v -v -v gives the table output format)
-V, --version Output version information and exit.
-w, --wait Wait and retry if connection is down.
Default options are read from the following files in the given order:
C:\WINNT\my.ini C:\my.cnf
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read
Possible variables for option --set-variable (-O) are:
connect_timeout current value: 0
max_allowed_packet current value: 16777216
net_buffer_length current value: 16384
select_limit current value: 1000
max_join_size current value: 1000000
C:\mysql\bin>
-------------------------------------------------------------
以上です。
----- Original Message -----
From: "遠藤 俊裕" <endo@xxxxxxxxxx>
To: <ml@xxxxxxxxxx>
Sent: Tuesday, August 02, 2005 1:50 PM
Subject: [mysql 11860] Re: mysqldumpについて
> 遠藤です。
>
> Tue, 2 Aug 2005 12:05:30 +0900 に、
> 福田 晃章 <t.fukuta@xxxxxxxxxx> さんは書きました:
>
> > LinuxのKtermより
> > mysqldump -u root -p gyoumudb > /back.txt;
>
> おそらく -q の間違いだとして、
> Windows は XP だとして、
>
> 例えば、
> ・cmd 起動して、
> ・C:\mysql\bin に移動して、
> ・mysql -u root gyomudb < C:\work\backup.txt
> とか、ですかね?
>
> --add-drop-table とか使った方が、より気持ちいいかも。
> この辺が参考かな?
> http://dev.mysql.com/doc/mysql/ja/mysqldump.html
>
> google で「mysqldump」を日本語で検索したら、一件目に出て
> きた所です(^^)
>
> > ※ backup.txt は、EUCで作成されていました。
> >
> > このback.txtファイルをWindowsのHDDに取り込むまでは
> > できた ( C:\work\backup.txt ) のですが、それ以降が
> > よく判りません。
> >
> > どなたか教えていただけませんか。
> >
> >
>
> --
> えんどう@あっぷらぼ
> mail: endo@xxxxxxxxxx, endo_t@xxxxxxxxxx, endo@xxxxxxxxxx
> http://www.applabo.com/
> http://homepage1.nifty.com/EndoT/
>
>
>
11857 2005-08-02 12:05 [福田 晃章 <t.fukuta] mysqldumpについて 11860 2005-08-02 13:50 ┗[遠藤 俊裕 <endo@xxxx] -> 11862 2005-08-02 18:47 ┗[福田 晃章 <t.fukuta] 11863 2005-08-02 18:53 ┗[遠藤 俊裕 <endo@xxxx] 11864 2005-08-02 19:08 ┗[福田 晃章 <t.fukuta]