MySQL Error MySQL Error
 

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]

Main Menu

MySQL Error

Started by furiousweebee, July 16, 2004, 01:34:17 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

furiousweebee

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:

QuoteCoppermine 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.

Joachim Müller

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

furiousweebee

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

<?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_";
?>

Joachim Müller

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

furiousweebee

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. :-[

Joachim Müller

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 ;)

furiousweebee

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.

Joachim Müller

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

furiousweebee

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?

Joachim Müller

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