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: URGENT database error please help  (Read 5611 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
URGENT database error please help
« on: September 19, 2013, 01:37:23 pm »

I moved my gallery folder and domain name to a new host
ftp uploaded all the gallery folder,set permissions etc
exported my coopermine databese with phpMyAdmin first on the old host
imported the database with phpMyAdmin on new host

Error

SQL query:

-- -- Database: `gc` -- -- -------------------------------------------------------- -- -- Table structure for table `cpg15x_albums` -- CREATE TABLE IF NOT EXISTS `cpg15x_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', `owner` int(11) NOT NULL DEFAULT '1', `thumb` int(11) NOT NULL DEFAULT '0', `keyword` varchar(50) DEFAULT NULL, `alb_password` varchar(32) DEFAULT NULL, `alb_password_hint` text, `moderator_group` int(11) NOT NULL DEFAULT '0', `alb_hits` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`aid`), KEY `alb_category` (`category`), KEY `moderator_group` (`moderator_group`), KEY `visibility` (`visibility[...]

MySQL said: Documentation
#1046 - No database selected


Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #1 on: September 19, 2013, 01:49:29 pm »

I installed a new coppermine gallery
coppermine created a new databes for the new gallery
I exported the databes and then renamed so will not overide the existing one and I get the same error
Is this a host problem?

I installed a new gallery for testing
I wanted to exported  the database of the new gallery to see if I get it right this time
but even this databes wont import - same error
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: URGENT database error please help
« Reply #2 on: September 19, 2013, 02:11:12 pm »

I think maybe you are struggling with phpmyadmin. Don't worry, it is not the most intuitive of packages. What the error is saying is that you need to create an empty database before importing your tables. The import just imports the tables into a db you create. How that works depends on where in phpmyadmin you press the export button in the first place.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #3 on: September 19, 2013, 02:24:54 pm »

thanks . you right

my database name on the old server was gc
now I created a new databes  - named it gc but my host adds by default myhostusername_ to all the databases I creat so the databes name is my hostusername_gc
imported the databes and it worked , I can see all coppermine tables

BUT

Coppermine critical error:
Unable to connect to database !

MySQL said: Unknown MySQL server host 'mysql' (0)
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #4 on: September 19, 2013, 03:05:47 pm »

can I edit something in coppermine files to accept the database with the new name name ?
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #5 on: September 19, 2013, 03:08:15 pm »

my host says but its the default settings to database always comes username_prefix

BUT it is not like that on yahoo host , always just the name you tyoed for the new db with no defaul prefix
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #6 on: September 19, 2013, 03:46:51 pm »

ok.found the answer to change databes name:

http://forum.coppermine-gallery.net/index.php?topic=38908.0
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #7 on: September 19, 2013, 04:07:35 pm »

I did have to change everything in include/config.inc.php

dbserver , dbuser , dbpass and dbname ( for how has a hard time like me understanding the error :

Coppermine critical error:
Unable to connect to database !

MySQL said: Unknown MySQL server host 'mysql' (0)

I did not changed the dbserver from mysql to my new host database server
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: URGENT database error please help
« Reply #8 on: September 19, 2013, 04:12:42 pm »

I readed the copermine docs :

http://documentation.coppermine-gallery.net/en/export.htm

100 times for last 24 hours and I forgot this step  :o
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.