Reply to Re: Back up mysql db from shell

Your name:

Reply:


Posted by tihu on 05/09/06 11:22

apostolosl@gmail.com wrote:
> Hi there.
> I need to update a remote database from a local one. I use mysqldump in
> my php page in order to create a file for each table, like this:
>
> $command="mysqldump table_products > table_products.sql";
> system($command);
>
> This works perfect and it gives me a file with a drop-table,
> create-table and all the insert values.
>
> Then I need to connect to the remote server and run the
> table_products.sql file.
>
> The way I do that is by calling the following in my php page:
>
> $command="mysql --host=$host --user=$user --password=$pass
> --database=$db;";
> system($command);
>

Adding "< stb_products.sql" to the end of the command line should work.


Tim

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация