![]() |
|
#1
|
|||
|
|||
export mysqldatabaseis it possible to export mysqldatabase using php ie(using phpcode access the mysqlserver zip the database & send it to the server)?if yes how
thanks in advance |
|||
|
#2
|
|||
|
|||
|
Well it can be done on the Unix command line simply by:
mysqldump -uUsername -pPassword dbname -c | gzip > dbname.gz This command connects to mysql using your Username/Password, selects the database 'dbname', dumps everything there into a gzipped file called dbname.gz The -c switch means it writes full INSERT querys including the names of the columns. Then using PHP (if you wish), you can call run this command using the system() call. GF |
|
#3
|
|||
|
|||
|
Keep in mind that depending on the size of your database, and the amount of time that PHP scripts on your server have to run, you may get a partial or corrupted backup. The only truly safe way to make a backup of your database is by running the command that Garth gave directly from the command line (via Telnet/SSH).
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The