![]() ![]() ![]() #!/bin/sh # store start date to a variable imeron = ` date ` echo "Import started: OK" dumpfile = "/home/bob/bobiras.sql" ddl = "set names utf8 " ddl = " $ddl set global net_buffer_length=1000000 " ddl = " $ddl set global max_allowed_packet=1000000000 " ddl = " $ddl SET foreign_key_checks = 0 " ddl = " $ddl SET UNIQUE_CHECKS = 0 " ddl = " $ddl SET AUTOCOMMIT = 0 " # if your dump file does not create a database, select one ddl = " $ddl USE jetdb " ddl = " $ddl source $dumpfile " ddl = " $ddl SET foreign_key_checks = 1 " ddl = " $ddl SET UNIQUE_CHECKS = 1 " ddl = " $ddl SET AUTOCOMMIT = 1 " ddl = " $ddl COMMIT " echo "Import started: OK" time mysql -h 127.0.0. If the sql contains double quotes ('), yo'll have to escape them If the SQL statements go over multiple lines, you'll have to figure that out. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |