Hi Im contructing a build script and would like to dump my dev db with mysqldump so I can run a deploy script on the production server with the update db.
I would like to construct the script so that it updates existing tables/fields/posts and add new tables/fields/post if they do not exists. My buildscript constructs this command (written in php): $command = "mysqldump". " --password=$pass". " --user=$user". " --skip-opt". " --add-locks". " --create-options". " --disable-keys". " --extended-insert". " --lock-tables". " --quick". " --result-file=".self::BUILD_PATH.'/'.self::PROJECT_NAME."/".$dbName."_dump.sql". " --databases ".$dbName; shell_exec($command); and mysql dump generates the file with out any problems.......but: I have noticed, that when I dump from phpmyadmin 'IF NOT EXISTS' is added to all create table statements. This dos not happen with the above command. It is added to create database statement thought... is that good enought? In the phpmyadmin dump you can use update statements instead of insert to populate the tables. Can, and if so, how is this accomplished with mysqldump? I have read alot about mysqldump at this adress: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html but can't seem to find the answers for the above questions. Any help or pointer greatly appreciated. -- Regards / Venlig hilsen Johannes Skov Frandsen *Address:* Egelundsvej 18, DK-5260 Odense S *Web:* www.omesc.com | *Email:* [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]