SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: BLOB's in MySQL

  1. #1
    SitePoint Member camilloss's Avatar
    Join Date
    May 2005
    Location
    Poland, Torun
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BLOB's in MySQL

    Hi, I have problem with storing files in MySQL [4.1.11].
    I desinged database for documentation [PDF and AutoCAD files + description].

    1. Size of files is various [10-100Mb so I had to change max_allowed_packet variable [http://dev.mysql.com/doc/mysql/en/pa...oo-large.html]
    but I still have a problem while sending files to database [via php/http serv]] Database is located in LAN for small group, so there is about 50 guests a day.
    I dont know if it's the best solution. Maybe I should store files outside database [eg. folders] and only link it with description in database?

    2. Is there other mySQL variables that I should change to fix this problem?

    greetings
    camilloss

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    what error are you getting?

    and yes, storing the files outside the database is better.

  3. #3
    SitePoint Member camilloss's Avatar
    Join Date
    May 2005
    Location
    Poland, Torun
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck
    what error are you getting?
    ok thx, shame on me but problems were also connected with php not only mysql. I fixed it but I still get error 2006 [Server has gone away].

    Quote Originally Posted by longneck
    and yes, storing the files outside the database is better.
    ok thx longneck,

    camilloss

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    look in the mysql manual for max_packet_size. that is what's causing your "server has gone away" problem. switch to storing the files outside the database and this problem will go away.

  5. #5
    SitePoint Zealot newspire's Avatar
    Join Date
    Mar 2005
    Location
    Houston, TX
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Storing files outside the db is not always better. It depends on the application. For most of my applications storing this kind of file outside the db causes all kinds of problems.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •