Re: Dumping file in to MySQL via PHP
| From: | Michael Dearman | Date: | Sat, 04 Nov 2000 18:32:09 +0000 |
| Subject: | Re: Dumping file in to MySQL via PHP | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4216@lists.php.net to get a copy of this message | ||
Hi Vojtech,
As usual, I don't quite understand exactly how your doing all this.
But this is a good thing I need to do for my admin pages.
Vojtech Dvorak wrote:
>
> Dear all,
> I have problems with dumping file made by mysqldump to MySQL database on our
> web server via PHP script.
> For updating that web server we can use just PHP (so I can't use mysqlimport
> etc.)
> I have nicely created dump file with complete inserts etc.
> Than I save file in to web server...
Did you save the file to the server with php code, ftp, telnet?
> ...and want to run PHP script which will do
> all orders in that dump file...
Are you familiar with this form of a mysqldump command?
mysqldump my_db | mysql -h other.server.com my_other.db
of course you'll need to take care of user name and password some how.
But this will dump directly into your other server.
Also. Just in case you haven't ran into this yet, read up on the
--add-drop-table option.
Mike D.
> Please don't you know some easy example for this anywhere...
> Thanks
> Vojtech
>
> PS: I know I can make it by PHPMyAdmin, but I need to do it when page opens
> and without any output... :(
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net