Microsoft
Software
Hardware
Network
Question : How to import a mysqldump --all-databases file, using php exec()
On our production server, every night a PHP script runs, it performs a mysqldump of all databases into a file named [weekday]_mysqlbackup.sql - after the file is zipped and FTP'd to our backup server at another location. Works fine
Now... on the backup server I want to automate the import of the sql file
I made a PHP script to unzip the file and do a exec() that will import the complete backup file.
But how can I import a --all-databases file into the server using mysql commandline
I tried doing this : $cmd = "mysql -u root -p mysecretpass < ". $path . "OLO_daglig_mysql_backup.s
ql";
But I get an error from mysql saying it cant find the database mysecretpass !!
What to do ?
Answer : How to import a mysqldump --all-databases file, using php exec()
On the mysql command line, there is no space between the -p switch and the password, it should be :
"mysql -u root -pmysecretpass < ". $path . "OLO_daglig_mysql_backup.s
ql";
Random Solutions
Need help with 'System.Web.UI.ScriptManag
er is not defined error
ORA-06502 error when calling stored procedure from Visual Basic 6
how can i upload 900 mb file to internet ,is there any website to free upload ?
code for an application which can read a portion of the screen and writes it on another portion of the screen.
How can I convert a custom control that calls User32 and Shell32 to work on Mono?
How to determine coaxial cable
imac osx 10.5 - Does not boot; cannot find harddrive. Getting a folder icon wid a question mark flashin at startup
Best LAN Network Switch Design?
isa 2004 and iis7
Hyperion EssBase video tutorials