i am buiding a automatic create website system...when i am installing web for my customer, at step i am excute the my sql file i am using like this :
# MySQL with PDO_MYSQL
$db = new PDO("mysql:host=$mysqlHostName;dbname=$mysqlDatabaseName", $mysqlUserName, $mysqlPassword);
$query = file_get_contents($local_sql); //Local file abc.sql
$stmt = $db->prepare($query);
if ($stmt->execute()){
My problem is i have up to 117 table need to create and many many insert sql on this file.
Everytime i buidling 2 or more than website it freeze my server and let it dead.
My question is have any solution ? can excute a big sql file like that faster the way i am using ?
Sorry if my english so bad.
Thank all !