Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: MySQL Error  (Read 4545 times)

0 Members and 1 Guest are viewing this topic.

furiousweebee

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
MySQL Error
« on: July 16, 2004, 01:34:17 am »

Hey there everyone,

I've had a gallery up and running for a month or two now, and a user has gone in to add photos and somehow screwed up things sufficiently (they were only trying to add photos!) such that I receive the following error on my gallery page:

Quote
Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Does anyone know how I could fix this? I don't know when or how it happened unfortunately.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: MySQL Error
« Reply #1 on: July 16, 2004, 08:25:31 am »

that's impossible - coppermine can't loose mySQL connection by just uploading some pics. Check if your file include/config.inc.php has become corrupted (download it from your webserver and post the contents here, replacing the password with asterisks).

GauGau
Logged

furiousweebee

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: MySQL Error
« Reply #2 on: July 16, 2004, 08:29:39 am »

Well, they had access to all of the admin menu and everything. Here's my file:

Code: [Select]
<?php
// Coppermine configuration file

// MySQL configuration
$CONFIG['dbserver'] =                         "localhost";        // Your database server
$CONFIG['dbuser'] =                         "--------";        // Your mysql username
$CONFIG['dbpass'] =                         "--------";                // Your mysql password
$CONFIG['dbname'] =                         "main";        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                "gallery_";
?>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: MySQL Error
« Reply #3 on: July 16, 2004, 08:36:43 am »

gasp: they had admin access? Well, then anything is possible, check your config. Did you give them admin access deliberately?

I guess you have values for "--------" in your file, you just replaced them with "-", right? (Usually you replace with asterisks).

GauGau
Logged

furiousweebee

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: MySQL Error
« Reply #4 on: July 16, 2004, 08:40:14 am »

Yeah I did replace them, and yes they deliberately had access to that.

Funny thing is, the error just fixed itself - I didn't do anything but it works again now. So strange. Thanks for your help anyway, sorry to have wasted your time man. :-[
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: MySQL Error
« Reply #5 on: July 16, 2004, 08:42:54 am »

no problem, you're welcome. If the problem "fixed itself", it's probably related to your server setup - coppermine couldn't connect to mySQL, probably because mySQL service was unavailable. If the server is your to administer, check your server logs. Is the mySQL database running on overload?

GauGau

P.S. you really shouldn't grant admin access to others ;)
Logged

furiousweebee

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: MySQL Error
« Reply #6 on: July 16, 2004, 08:49:03 am »

To answer everything neatly... lol:

The gallery is the only thing in the database.
I'm not the server administrator.
How do I create more user accounts? I would have if I knew how.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: MySQL Error
« Reply #7 on: July 16, 2004, 10:22:03 am »

click "users" on the admin menu. Notice the button "create new user" at the bottom of the screen? That's where you create new users (if you disabled registration in your config screen - it's even easier to let users register).

GauGau
Logged

furiousweebee

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: MySQL Error
« Reply #8 on: July 16, 2004, 11:31:47 am »

Ah, hehe. The reason I didn't know where it was is because I had deleted it from the menu when I modified the skin. But I can just go directly to the URL of usermgr.php and it works lol.

I've added a new user and set their group (registered) permissions to the same as myself (Administrator), but they can't make new albums. Where can I enable that?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: MySQL Error
« Reply #9 on: July 16, 2004, 01:55:42 pm »

regular users can't, only the admin can create albums in the "regular" (public) categories. Users can only create albums within their "user gallery" (if you let them have one). Don't give them admin permissions, or you're back to where you were in the first place. Make them upload to a particular album, enable admin approval and move pics for them, or allow them to have user galleries.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.