proper way to solve mysql max user connection error

Posted by Rahul a common name on Stack Overflow See other posts from Stack Overflow or by Rahul a common name
Published on 2011-01-01T06:18:23Z Indexed on 2011/01/01 6:54 UTC
Read the original article Hit count: 352

Filed under:
|
|

Hello every one,

I'm using PHP with MYSQL database as both are open source and easy to use.

I'm getting problem when I execute insert and/or update of millions of row one after another

while this operation perform I got the MYSQL error that:

'max_user_connections' active connections  

which is the best way to solve this problem.

I don't want to use another database or language other then PHP.

 connect_db();
   $query = "insert into table(mobno,status,description,date,send_deltime,sms_id,msg,send_type) values('".$to."','".$status."','".$report."','','".$timewsha1."','".$smsID."','','".$type."')";

    $result = mysql_query($query) or ("Query failed : " . mysql_error());

this query will execute thousand of times.

and then server give connection error.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql