Существует множество причин, по которым «сервер MySQL ушел». Взгляните .
Во всяком случае, странно, что вы загружаете ВСЕ страницы. Обычно подача RSS подразумевает, что вы помещаете туда только тему и фрагмент текста. Я бы создал RSS-канал в виде простого XML-файла, поэтому нет необходимости загружать данные из MySQL на КАЖДОГО пользователя. Вы создаете новости -> регенерируете RSS XML файл, вы пишете новую статью -> регенерируете RSS XML файл.
Если вы все еще хотите подготовить данные для вставки, просто создайте файл со ВСЕМИ вставками, а затем загрузите данные из этого файла.
$ mysql -u root
mysql> \. /tmp/data_to_load.sql
Да! все 2300 одновременно;)
$generated_sql = 'insert into Table (c1,c1,c3) values (data1,data2,data3);insert into Table (c1,c1,c3) values (data4,data5,data6);';
$sql_file = '/tmp/somefile';
$fp = fopen($sql_file, 'w');
fwrite($fp, $generated_sql, strlen($generated_sql)); // wrote sql script
fclose($fp);
`mysql -u $mysql_username --password=$mysql_password < $sql_file`;
В последней строке обязательно стоит указывать галочку!
$ mysql -u root test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 171
Server version: 5.1.37-1ubuntu5.5 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create table test (id int(11) unsigned not null primary key);
Query OK, 0 rows affected (0.12 sec)
mysql> exit
Bye
$ echo 'insert into test.test values (1); insert into test.test values (2);' > file
$ php -a
Interactive shell
php > `mysql -u root < /home/nemoden/file`;
php > exit
$ mysql -u root test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 180
Server version: 5.1.37-1ubuntu5.5 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select * from test
-> ;
+----+
| id |
+----+
| 1 |
| 2 |
+----+
2 rows in set (0.00 sec)
Итак, как вы можете видеть, он работал отлично.