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: installing/restoring database  (Read 5582 times)

0 Members and 1 Guest are viewing this topic.

Donut

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
installing/restoring database
« on: October 27, 2006, 12:48:01 am »

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.
« Last Edit: October 27, 2006, 06:14:56 am by GauGau »
Logged

Nibbler

  • Guest
Re: installing/restoring database
« Reply #1 on: October 27, 2006, 01:28:45 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.
Logged

Donut

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: installing/restoring database
« Reply #2 on: October 27, 2006, 01:36:32 am »

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?
Logged

Nibbler

  • Guest
Re: installing/restoring database
« Reply #3 on: October 27, 2006, 01:44:53 am »

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

Donut

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: installing/restoring database
« Reply #4 on: October 27, 2006, 01:48:22 am »

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_'        ;

Logged

Nibbler

  • Guest
Re: installing/restoring database
« Reply #5 on: October 27, 2006, 02:39:36 am »

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

Donut

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: installing/restoring database
« Reply #6 on: October 27, 2006, 03:45:04 am »

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.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: installing/restoring database
« Reply #7 on: October 27, 2006, 06:08:20 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.

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

Donut

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: installing/restoring database
« Reply #8 on: October 27, 2006, 06:13:50 am »

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

xGrape

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: installing/restoring database
« Reply #9 on: December 24, 2006, 01:28:50 pm »

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).
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 15 queries.