Re: Dumping file in to MySQL via PHP

From: Date: Mon, 06 Nov 2000 08:19:18 +0000
Subject: Re: Dumping file in to MySQL via PHP
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-4229@lists.php.net to get a copy of this message
Hi Michael, sorry I didn't make my self clear... Please see my comments in text below. > 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? I have AutoFTP daemon running on my local server that is capable of sending files through FTP in exactli given times. > > > ...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. > Yes I am familiar with these commands (I am making my dump file with this ;-) ) But I can' access directly to remote MySQL. Our provider allows update only by PHP scripts.... So what I need is PHP script that will take dumpfile (previously saved by AutoFTP prog. to remote server) and do update of MySQL. Easy, but how do I do it? Thanks Vojtech

« previous php.db (#4229) next »