Move coppermine from one server to another? Move coppermine from one server to another?
 

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

Move coppermine from one server to another?

Started by Jlund, June 24, 2006, 05:19:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jlund

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

Jlund


photomonkey

Quote from: Jlund on June 24, 2006, 05:44:55 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 ?

Sami

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 don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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

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.

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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

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.

photomonkey

Quote from: photomonkey on June 25, 2006, 06:59:03 AM
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

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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


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 "

Sami

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

photomonkey

#11
Quote from: bmossavari on June 25, 2006, 08:50:08 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

Sami

 ???
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 don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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?

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.

Sami

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)
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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)

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 ?

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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

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'

Sami

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

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
‍I don't answer to PM with support question
Please post your issue to related board

photomonkey

Quote from: bmossavari 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

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?