Am Sonntag, 13. Mai 2007 20:30 schrieb Rob Church:
On 13/05/07, Klaus Becker <colonius(a)free.fr>
wrote:
">mysqldump wikidb >
/home/klaus/backup.sql" or
">mysqldump wikidb > backup.sql"
You might need to pass authentication information, e.g.
%mysqldump -u wikiuser -p wikidb >wikidb.sql
Also check the database name and server state, etc.
If I try the same command in phpmyadmin, I get:
mysqldump is an application, not an SQL statement; it won't work in
phpMyAdmin.
Rob Church
Hi Rob,
finally I can dump and restore my db correctly with
mysqldump -u root -p --default-character-set=latin1 -d wikidb
'/home/klaus/backup.sql'
mysql -u root -p wikidb < '/home/klaus/wikidb.sql'
I did this for my local db and with this method I have no more charset
problem ! That's what I am searching since a long time. There must be a
problem with phpmyadmin, because saving and restoring with phpmyadmin 2.9.1.1
creates charset problems if if I indicate "MySQL connection collation:"
latin1_bin.
But now the great question: how can I do the same thing with my db on the web
(
ovh.net). Mysqldump does'nt work within phpmyadmin, so I can't execute it
remotely.
The manpage says:
mysqldump is also very useful for populating databases by copying data from
one MySQL server to another:
shell> mysqldump --opt db_name | mysql --host=remote_host -C db_name
Is this the right way to dump my db remotely ? If yes, can you explain this
command a little bit ? What is "remote_host -C" ?
Or is there a script to do it, for example dumpBackup.php ? Can I restore then
with importDump.php ?
All this is quite new for me, I always used phpmyadmin or a scrit to upload my
local db and I never had these problems.
thanks
Klaus