mysql connection has gone away
Moderator: General Moderators
mysql connection has gone away
im trying to upload files into mysql but for files bigger than 1 mb, it throws that error. So i did a little reasearch and they mostly said change max_allowed_packet in mysql to bigger size. i did that and i still get this error. any ideas?
Re: mysql connection has gone away
It is very, very BAD.im trying to upload files into mysql
Do NOT do that EVER
-
ldougherty
- Forum Contributor
- Posts: 103
- Joined: Sun May 03, 2009 11:39 am
Re: mysql connection has gone away
Generally this is not a good idea as you don't want to store large file(s) in a database.
If you are getting the message, it is not due to a setting or limit. The message means you have lost connection to the mySQL server which could be due to many different reasons but likely just server performance.
If you are getting the message, it is not due to a setting or limit. The message means you have lost connection to the mySQL server which could be due to many different reasons but likely just server performance.
Re: mysql connection has gone away
Well what's the error? Did you restart MySQL after changing the size? Are the PHP memory limit and, max post size and max upload size settings too low? And the previous post is correct. What you ought to be doing is storing the file name in the database, not the actual file.