installing/restoring database installing/restoring database
 

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

installing/restoring database

Started by Donut, October 27, 2006, 12:48:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donut

i have been having a hard time restoring the database to the coppermine gallery that was on a previous webhost.

i now have the sql database file in the proper version dump.
but i have trouble getting the gallery to see the database.

ive tried doing a fresh installing of the coppermine gallery after importing the sql database but the gallery wont install. saying that the tables cp140 and such already exist. and i cant continue further.

ive tried installing the gallery first and then later importing the database. but i then get the error:

'Coppermine critical error:
Unable to connect to database !

MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'

i am not sure if there is something i have overlooked or if im not taking the right steps to get this task done.

i have been very limited on time, so i have been with this back and forth for a couple of weeks now.

the webhost is 'godaddy.com' , dunno if that helps, but thats the control panel i have been working with during this whole ordeal.

was hoping someone here could help me or guide me thru the procedure.
i thought itd be simple to get done, but obviously not.

so if anyone can please assist me.

Nibbler

Quote from: Donut on October 27, 2006, 12:48:01 AM
the webhost is 'godaddy.com' , dunno if that helps, but thats the control panel i have been working with during this whole ordeal.

Helps to know that, but it certainly doesn't help you...

You need to edit the file include/config.inc.php and enter the mysql information of the imported tables.

Donut

in that file i see

  $CONFIG['dbserver'    ] = 'localhost' ;
    $CONFIG['dbuser'      ] = 'krysta48_copp1' ;
    $CONFIG['dbpass'      ] = '' ;
    $CONFIG['dbname'      ] = 'krysta48_copp1'   ;
    $CONFIG['TABLE_PREFIX']

so are you saying that instead of local host i enter the server address?

or does something need to be added onto this?

Nibbler

Make sure the db username, db name and db password are correct. If you have moved webhost then they are likely to have changed. Create a new database user using whatever tools your webhost provides for the purpose, or use any details you have been assigned by them.

Donut

this is more or less what i have changed

$CONFIG['dbserver'    ] = 'mysql225.secureserver.net' ;
    $CONFIG['dbuser'      ] = 'coppgall' ;
    $CONFIG['dbpass'      ] = 'password' ;
    $CONFIG['dbname'      ] = 'coppgall'   ;
    $CONFIG['TABLE_PREFIX'] = 'cpg140_'        ;


Nibbler

I can't tell you if that is correct or not, you'd need to check with your host if you don't know.

Donut

oh well no i know that information is correct.

what i am asking is if that is all that needs to be done and it should work. or is there anything else i need to look over to ensure that everything will run smoothly.


Joachim Müller

Quote from: Donut on October 27, 2006, 12:48:01 AM
MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Ask your webhost for support on this error message, it's no related to coppermine.

Quote from: Donut on October 27, 2006, 12:48:01 AM
the webhost is 'godaddy.com' , dunno if that helps, but thats the control panel i have been working with during this whole ordeal.
Godaddy is notorious for "funny" issues. Make sure not to use their "value added" application, it stinks.Install as suggested in your docs instead.

Donut

i did ask godaddy about that and they said that they didnt have a problem connecting to the database. and that it was on my end and they couldnt help me with it  :'(

but it seems to work now. because i am not getting that error. i now see the gallery's index page.
now i just need to re import the database thru godaddy. because i had deleted it and the tables with my trial and error experiments.

xGrape

I just have to say: this does NOT have to be a problem with your host. I had the same issue. Not all hosts allow the use of "localhost" as your mysql server. So when I moved my gallery between hosts, I had to edit the include/config.inc.php file as suggested above.

instead of this: $CONFIG['dbserver'    ] = 'localhost' ;
I used this: $CONFIG['dbserver'    ] = 'mysql.mydomain.com' ;
Of course you will have to use the adress of YOUR mysql server. Ask your host if in doubt.
Also, you might need to update your username/password if it has changed (in the same file).