Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Critical error: Unknown MySQL host  (Read 5189 times)

0 Members and 1 Guest are viewing this topic.

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Critical error: Unknown MySQL host
« on: July 17, 2015, 03:38:49 pm »

I need a bit help here. Recently (in June), I moved my domain to a new host. That took me 1˝ month to get moved along with my data.
Now that everything should be settled and ready, there's this one problem when I try enter the gallery:

Coppermine critical error:
Unable to connect to database !

MySQL said: Unknown MySQL server host 'judefans.net.mysql' (0)

I have tried several times to contact my new host to get help and support on solving this. But they doesn't seem to wanna help me out and I really don't feel like delete the gallery after 1 year of dedicated work and re-install everything.
Anyone knows how to fix this? The domain is http://judefans.net/gallery
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Critical error: Unknown MySQL host
« Reply #1 on: July 17, 2015, 07:14:39 pm »

Try
1. localhost
2. your IP
or
3. your domain name
as MySQL host.

If that doesn't help you need to wait for your support guys.
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Re: Critical error: Unknown MySQL host
« Reply #2 on: July 18, 2015, 01:24:33 pm »

Try
1. localhost
2. your IP
or
3. your domain name
as MySQL host.

If that doesn't help you need to wait for your support guys.
How do I try all 3 steps? As I'm not 100% sure I know what you mean..
But thank you for the reply :)
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 723
    • GMC Design Photo Gallery
Re: Critical error: Unknown MySQL host
« Reply #3 on: July 19, 2015, 10:13:11 pm »

Coppermine database connection info is stored in yourgalleryurl/include/config.inc.PHP
You need to edit this file (either on your server via your ISP's control panel tools, or locally on your pc and then publish to site.)

This line points to the database:
Code: [Select]
$CONFIG['dbserver'] = 'judefans.net.mysql';      // Your database server
Change the assigned value to 'localhost' or one of Stramm's other suggestions....
You may also need to change the dbuser, dbpass, and dbname to match the credentials at your new hosting site.
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Critical error: Unknown MySQL host
« Reply #4 on: July 20, 2015, 11:52:26 am »

So, I need to create a new MySQL database with new user/pass and info and than direct it to localhost as well?
Do I need to create a table name prefix? Cause I already tried but failed, as it didn't come along with the database..
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4482
    • Windsurf.me
Re: Critical error: Unknown MySQL host
« Reply #5 on: July 20, 2015, 12:07:17 pm »

No, you should hopefully have a database already setup with all the data from your previous host. You simply need to provide the credentials to point to that.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Critical error: Unknown MySQL host
« Reply #6 on: July 20, 2015, 12:09:29 pm »

You need to import your existing Coppermine database to your new MySQL server (if it doesn't already exist) and then adjust the database credentials in include/config.inc.php. The table prefix won't change, but the database server, database name, user name und user password will probably differ from your old setup.
Logged

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Critical error: Unknown MySQL host
« Reply #7 on: July 20, 2015, 12:37:21 pm »

Sadly, my new host didn't move the datas from my old host to theirs and I already cancelled my previous host, so my account will be deleted around august-september..

Besides, I already compared my file to another gallery file of mine and they didn't look quite the same.. The info was similar, but the order was different..

That's why I thought it would be easier solution to just create a new mysql and add it to the config file..
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Critical error: Unknown MySQL host
« Reply #8 on: July 20, 2015, 12:44:18 pm »

I already cancelled my previous host, so my account will be deleted around august-september..

Then you should hurry and backup your database!


That's why I thought it would be easier solution to just create a new mysql and add it to the config file..

This is equal to a new Coppermine installation (i.e. a blank gallery without any content).
Logged

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Re: Critical error: Unknown MySQL host
« Reply #9 on: July 20, 2015, 03:03:27 pm »

Then you should hurry and backup your database!

This is equal to a new Coppermine installation (i.e. a blank gallery without any content).
Don't get me wrong.. All files and content has been moved to my new host, but the mysql databases did my new host leave at the old host and didn't create a new one..

So, how exactly am I supposed to move the mysql info from my old soon-cancelled host to the new account?
I'm not quite sure I understand this :-\

By the way, let me know if anyone needs a screenshot of anything :)
Logged

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Critical error: Unknown MySQL host
« Reply #10 on: July 20, 2015, 03:15:36 pm »

Sorry for double posting, but I couldn't find an edit button to update my last reply..
I was just wondering what happens IF I create a new mysql database from my new host and add the info to the config file? Will it still just appear blank and it's impossible to safe or can I still save it that way?

That's just an addictional question to my last response :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Critical error: Unknown MySQL host
« Reply #11 on: July 20, 2015, 03:26:06 pm »

There are basically 3 tasks to do:
1. Backup database on your old server
2. Restore database on your new server
3. Adjust credentials in include/config.inc.php

Please also have a look at http://documentation.coppermine-gallery.net/en/export.htm#moving_server

My recommendation for backup/restore a MySQL database via your browser is MySQLDumper: http://www.mysqldumper.net/


what happens IF I create a new mysql database from my new host and add the info to the config file?
Coppermine will display an error message that it cannot find mandatory tables.
Logged

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Critical error: Unknown MySQL host
« Reply #12 on: July 20, 2015, 05:06:41 pm »

Oh boy.. Considering I'm trying my best to backup the gallery in the right way, it just seems like a very complicated process that might take longer time..
So far, I have SQL and PHP files of the entire gallery, which I hope is correct..

If all of this fails in the end, that I did something wrong and time's up from my old cancelled host, is it than possible that I create a new photogallery from scratch at my new host and just starts over?
Cause right now, it seems to be the easiest choice to do..
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Critical error: Unknown MySQL host
« Reply #13 on: July 20, 2015, 05:16:33 pm »

I have SQL and PHP files of the entire gallery, which I hope is correct..

If you're talking about the 3 .sql files in the "sql" folder, that's not the backup of your database.



is it than possible that I create a new photogallery from scratch at my new host and just starts over?
Cause right now, it seems to be the easiest choice to do..

Of course you can always start a new gallery from scratch, but that's not the best option in my opinion. Actually, you even can run several galleries on the same server & domain simultaneously.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4482
    • Windsurf.me
Re: Critical error: Unknown MySQL host
« Reply #14 on: July 20, 2015, 05:40:34 pm »

I've sent you a PM. If you wish I have a little free time tomorrow. Send me your cpanel details of your OLD host and I will take a backup of your DB for you. Once I have that send me details of your new host and I will restore it for you.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Re: Critical error: Unknown MySQL host
« Reply #15 on: July 20, 2015, 07:22:47 pm »

I've sent you a PM. If you wish I have a little free time tomorrow. Send me your cpanel details of your OLD host and I will take a backup of your DB for you. Once I have that send me details of your new host and I will restore it for you.
Thank you so much :D That's so kind of you..
I'll send an e-mail later today with the info.. :)
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4482
    • Windsurf.me
Re: Critical error: Unknown MySQL host
« Reply #16 on: July 21, 2015, 12:54:29 am »

Hopefully that is all OK now. Please learn how to use PHPmyadmin or MySqldumper from your cPanel and take regular backups of your db and files. If you look at the config.inc.php file you will see the database I have used (hopefully that is the one you wanted to be used, it was empty so I assumed it would be OK) and I have setup the user detailed in that file just for this.

Please make sure you run http://judefans.net/gallery/update.php as soon as possible to make sure everything us up to date and correct in its new location.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

SnuppyNusser

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Re: Critical error: Unknown MySQL host
« Reply #17 on: July 22, 2015, 01:29:05 pm »

Hopefully that is all OK now. Please learn how to use PHPmyadmin or MySqldumper from your cPanel and take regular backups of your db and files. If you look at the config.inc.php file you will see the database I have used (hopefully that is the one you wanted to be used, it was empty so I assumed it would be OK) and I have setup the user detailed in that file just for this.

Please make sure you run http://judefans.net/gallery/update.php as soon as possible to make sure everything us up to date and correct in its new location.
Thank you very much for helping me out and saving my gallery :D
I thought I knew how to backup any database, but it seems like I was wrong and didn't know how to.. I guess I will learn it with the time than - hopefully I will :)

I did run the update and everything looked fine.. I also uploaded new content without problems, so it seems like everything is working well now :)
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.