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] 2   Go Down

Author Topic: Move coppermine from one server to another?  (Read 15108 times)

0 Members and 1 Guest are viewing this topic.

Jlund

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Move coppermine from one server to another?
« on: June 24, 2006, 05:19:04 pm »

I currently have set my coppermine picture gallery up on a server (www.falcon1.dk), but I will soon have the oppertunity to get a
new webhotel where I can get the name I want (www.JLphoto.dk). The question is, can I move all of coppermine with pictures and all
from server1 to server2 withouth having to create it from skratch?

Regards
JLund
« Last Edit: June 24, 2006, 06:15:49 pm by TranzNDance »
Logged

Jlund

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Move coppermine from one server to another?
« Reply #1 on: June 24, 2006, 05:44:55 pm »

Never mind, figured it out.

Jlund
Logged

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #2 on: June 24, 2006, 10:01:05 pm »

Never mind, figured it out.

Jlund

How did you do it?  Im currently using e-rice.net as my host, but I have new host with Hostpc.com.  I copied all files/folders to the Hostpc server, but its missing the database. 

How can I get the database from e-rice.net ?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #3 on: June 24, 2006, 10:34:00 pm »

check your e-rice.net control panel , if you have a Mysql manager then create a backup from coppermine database ( db name is under your include/config.inc.php)
if you didn't have any Mysql admin tool then you should install PhpMyadmin (it's web base mysql admin tool) and take backup from your db
then go to your other host and reastore your db backup
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #4 on: June 25, 2006, 05:38:59 am »

check your e-rice.net control panel , if you have a Mysql manager then create a backup from coppermine database ( db name is under your include/config.inc.php)
if you didn't have any Mysql admin tool then you should install PhpMyadmin (it's web base mysql admin tool) and take backup from your db
then go to your other host and reastore your db backup

I see the admin tool.

Another question.  Is there a way I can rename the sql database?  The one I originally used for my coppermine gallery is called "mywordpress".  It was a database I used for Wordpress, but I didnt use it and I forgot to delete and make a new one for Coppermine Gallery.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #5 on: June 25, 2006, 05:49:43 am »

yes you can create new empty database on new server then restore your db on new database, but you should modify your /include/config.inc.php and also shhould create new user with full privileges on new databse
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #6 on: June 25, 2006, 06:59:03 am »

yes you can create new empty database on new server then restore your db on new database, but you should modify your /include/config.inc.php and also shhould create new user with full privileges on new databse

Yep, i did that.  When I try to access teh site, it says

''While executing query "SELECT * FROM coppermineconfig" on 0

mySQL error: Table 'cmgallery_coppermgallery.coppermineconfig' doesn't exist"


cmgallery is the new username for my database.
Logged

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #7 on: June 25, 2006, 04:59:19 pm »

Yep, i did that.  When I try to access teh site, it says

''While executing query "SELECT * FROM coppermineconfig" on 0

mySQL error: Table 'cmgallery_coppermgallery.coppermineconfig' doesn't exist"


cmgallery is the new username for my database.

DOH!  Now I see why, i saved the old database as uncpmpressed and the new server needs a .gz file.

I tried uploading the .gz file, and I get this message.  Any ideas what could be wrong?  It still seems to see my old database name. (monkeywordpress1)

Unable to restore database cmgallery_coppermgallery : ERROR 1044 at line 12: Access denied for user: 'username@localhost' to database 'monkeywordpress1' gunzip: stdout: Broken pipe
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #8 on: June 25, 2006, 05:21:06 pm »

what did you do !?
do you have phpmyadmin at your new server? or any other mysql admin tool?
if you have a phpmyadmin just go there and create new database then copy all command from your uncompresed file  to sql query , this will create your old database with new name,then you just need to create a database user at your mysql manager and give that user full privileges ,
at the end you should edit your config.inc.php and put new database name ,username and password
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #9 on: June 25, 2006, 08:47:59 pm »

what did you do !?
do you have phpmyadmin at your new server? or any other mysql admin tool?
if you have a phpmyadmin just go there and create new database then copy all command from your uncompresed file  to sql query , this will create your old database with new name,then you just need to create a database user at your mysql manager and give that user full privileges ,
at the end you should edit your config.inc.php and put new database name ,username and password


Yep, im using phpAdmin on both servers.

It seems like when I export the database from the other server, it keeps the username/password for that database.  How can I remove that?

ALSO,
When you say "copy all command from your uncompressed file to sql query" do you mean the file I exported from my old server?  When I do this, I get an "Access denied for user xxx" which user xxx is my new username for the new server.

WHen you say "
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #10 on: June 25, 2006, 08:50:08 pm »

you should first give the new user full privileges over new database
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #11 on: June 25, 2006, 09:03:31 pm »

you should first give the new user full privileges over new database

Yep, i did that

it seems like the exported database is saving the database name and username/password
« Last Edit: June 25, 2006, 09:13:28 pm by photomonkey »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #12 on: June 25, 2006, 10:01:39 pm »

 ???
let's start from the beginning:
- both server have Cpanel
- both have "Mysql Databases"=>PhpMyAdmin
- what is your old database's name?
- what is your new database's name?
- what is your old username?
- what is your new username?
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #13 on: June 25, 2006, 10:13:34 pm »

???
let's start from the beginning:
- both server have Cpanel
- both have "Mysql Databases"=>PhpMyAdmin
- what is your old database's name?
- what is your new database's name?
- what is your old username?
- what is your new username?

I dont think the old server has Cpanel, its e-rice.net.  E-rice does have PhpMyAdmin.  HostPC is my new server.  It has DirectAdmin and PhpMyAdmin.

Old database name = monkeywordpress1
New database name = cm_gallery

old username = cmonkey9
new username = cm_gallery

I see you use Yahoo IM, we can chat if you want.  Thanks for the help so far.
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #14 on: June 25, 2006, 10:29:04 pm »

sorry I don't use yahoo messanger now (it has a security bug)
- do you have any Mysql manager (database manager) on DirectAdmin?(I'm not familier with DirectAdmin)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #15 on: June 25, 2006, 10:37:58 pm »

sorry I don't use yahoo messanger now (it has a security bug)
- do you have any Mysql manager (database manager) on DirectAdmin?(I'm not familier with DirectAdmin)

Yes, DirectAdmin has a SQL Manager - which lets you create a database and add users.

What security bug are you referring to on Yahoo IM ?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #16 on: June 25, 2006, 11:26:22 pm »

okey did you add "cm_gallery" (as user) to "cm_gallery"(as database) with full privileges?
-yahoo is not our issue but :check it here
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #17 on: June 25, 2006, 11:37:42 pm »

okey did you add "cm_gallery" (as user) to "cm_gallery"(as database) with full privileges?
-yahoo is not our issue but :check it here

Yep, I created a new database, added user.  All privileges say "YES".

When I do a dump of my database backup, I get:


 SQL query:

-- phpMyAdmin SQL Dump
-- version 2.6.0-pl3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 25, 2006 at 03:44 AM
-- Server version: 4.0.22
-- PHP Version: 4.3.11
--
-- Database: `monkeywordpress1`
--
CREATE DATABASE `monkeywordpress1`

MySQL said: Documentation
#1044 - Access denied for user: 'cm_gallery@localhost' to database 'monkeywordpress1'
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Move coppermine from one server to another?
« Reply #18 on: June 25, 2006, 11:45:55 pm »

okey lets go to restore section :
- go to phpmyadmin
- open your cm_gallery database
- it should be empty (is it?)
- now click on "sql" button
- copy sql command from backup (it should be a plain text backup)
they seems like
Code: [Select]
DROP TABLE IF EXISTS `cpg148_albums`;
CREATE TABLE  `cpg148plug`.`cpg148_albums` (
  `aid` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `description` text NOT NULL,
  `visibility` int(11) NOT NULL default '0',
  `uploads` enum('YES','NO') NOT NULL default 'NO',
  `comments` enum('YES','NO') NOT NULL default 'YES',
  `votes` enum('YES','NO') NOT NULL default 'YES',
  `pos` int(11) NOT NULL default '0',
  `category` int(11) NOT NULL default '0',
  `thumb` int(11) NOT NULL default '0',
  `keyword` varchar(50) default NULL,
  `alb_password` varchar(32) default NULL,
  `alb_password_hint` text,
  PRIMARY KEY  (`aid`),
  KEY `alb_category` (`category`)
) ENGINE=MyISAM DEFAULT;
sorry but here, time is 1:30 am and i'm going to bed
hope someone else continue...I'll be back tomorrow
Logged
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Move coppermine from one server to another?
« Reply #19 on: June 25, 2006, 11:54:03 pm »

okey lets go to restore section :
- go to phpmyadmin
- open your cm_gallery database
- it should be empty (is it?)
- now click on "sql" button
- copy sql command from backup (it should be a plain text backup)
they seems like
Code: [Select]
DROP TABLE IF EXISTS `cpg148_albums`;
CREATE TABLE  `cpg148plug`.`cpg148_albums` (
  `aid` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `description` text NOT NULL,
  `visibility` int(11) NOT NULL default '0',
  `uploads` enum('YES','NO') NOT NULL default 'NO',
  `comments` enum('YES','NO') NOT NULL default 'YES',
  `votes` enum('YES','NO') NOT NULL default 'YES',
  `pos` int(11) NOT NULL default '0',
  `category` int(11) NOT NULL default '0',
  `thumb` int(11) NOT NULL default '0',
  `keyword` varchar(50) default NULL,
  `alb_password` varchar(32) default NULL,
  `alb_password_hint` text,
  PRIMARY KEY  (`aid`),
  KEY `alb_category` (`category`)
) ENGINE=MyISAM DEFAULT;
sorry but here, time is 1:30 am and i'm going to bed
hope someone else continue...I'll be back tomorrow

Maybe thats the problem.  I dont see a Restore section.  The way I tried to import the database backup was by clicking on the SQL icon on the left side, hot tip says "Query Window".  When that pops-up, 3 tabs are on the top. 

1.SQL
2.Import Files
3.SQL History

On Import Files, I have the choice to browse for a text file or gz file.  When I import the database backup, I get the message I posted earlier.

Is this the wrong section to be importing?
Logged
Pages: [1] 2   Go Up
 

Page created in 0.034 seconds with 21 queries.