Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: MySQL Host: "Can't connect to MySQL server", but right data!!!  (Read 3723 times)

0 Members and 1 Guest are viewing this topic.

santacruzshores

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
MySQL Host: "Can't connect to MySQL server", but right data!!!
« on: February 21, 2005, 03:03:17 pm »

Hi,

I've got an problem connecting my MySQL DB in the installation menu.
Error Message:

Code: [Select]
Could not create a mySQL connection, please check the SQL values entered

MySQL error was : Can't connect to MySQL server on 'subdomain.domain.tld' (113)

When I normally connnect my DB, i use:

Code: [Select]
mysql_connect("subdomain.domain.tld", "username", "password")
mysql_select_db("DB_name")

In the Coppermine Installation menu, I did the following:

MySQL Host: subdomain.domain.tld
MySQL Database Name: DB_name
MySQL Username: username
MySQL Password: password

Why can't he connect to my MySQL Host??

« Last Edit: February 22, 2005, 12:36:15 pm by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: MySQL Host: "Can't connect to MySQL server", but right data!!!
« Reply #1 on: February 21, 2005, 05:22:44 pm »

Your server name is actually subdomain.domain.tld?  The database you are trying to connect to is actually called DB_name?  Your username/password is actually username/password?  That doesn't sound right to me.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

santacruzshores

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: MySQL Host: "Can't connect to MySQL server", but right data!!!
« Reply #2 on: February 21, 2005, 05:36:08 pm »

No! I just didn't want to post my real data like on guy did it in an other post I saw...

The Problem is the connection to my Database, the adress is: rzserv2.fhnon.de
I just checked the email from the admin where he mailed Username/Passwort etc. , but everything seems to be alright!!!

What can be the reason for this error? Did I fill in the right data in the right field (as I posted above?)

What does it mean if you have the MySQL Host "localhost"? Maybe that is the problem and I put the wrong data in the wrong field!
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: MySQL Host: "Can't connect to MySQL server", but right data!!!
« Reply #3 on: February 21, 2005, 06:56:47 pm »

Usually your host gives you the MySQL host, the username and password.  This is not usually your website domain.  Most of the time, if your domain and MySQL server belong to the same host, your MySQL host is localhost.

Verify the information with your host.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

santacruzshores

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: MySQL Host: "Can't connect to MySQL server", but right data!!!
« Reply #4 on: February 21, 2005, 07:32:14 pm »

Hi,

my admin wrote the following by email:

DB-Server: rzserv2.fhnon.de
DB-user: lg01XXXX
DB-name lg01XXXX
DB-password: XXXXXXXXXXXX

"X" means hidden character, DB-user and DB-name are the same.

So, what do I have to fill in and where?
The database and the coppermine script are located on different servers, might that be the problem?
« Last Edit: February 21, 2005, 11:30:01 pm by kegobeer »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: MySQL Host: "Can't connect to MySQL server", but right data!!!
« Reply #5 on: February 22, 2005, 08:45:25 am »

the reason for most webhosts forcing users to use localhost is that they mustn't use the mySQL database from other webspace, so you can only use it from the webserver you have paid for; otherwise, you could give mySQL access to webspace that hasn't been sold with mySQL being enabled. Obviously, your webhost doesn't force this localhost policy on you, but nevertheless they might have other mechanisms in place to keep you from accessing the mySQL database from domains that haven't been scheduled to be used with the mySQL db. You should write a small test script within your coppermine folder (called "test.php" or something and write that little test script you were refering to in your posting:
Code: [Select]
mysql_connect("subdomain.domain.tld", "username", "password")
mysql_select_db("DB_name")
. If you have made sure it works, but the coppermine mySQL connection doesn't, this might be a coppermine issue (although I doubt it). If the above code doesn't work, you should contact your webhost for support.

Joachim
Logged

santacruzshores

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: MySQL Host: "Can't connect to MySQL server", but right data!!!
« Reply #6 on: February 22, 2005, 10:59:51 am »

Alright, thanks for your answer, the problem seems to be solved  :\'(  >:(! I don't get a db conntection with a php script, so it doesn't work with coppermine either!
The Webspace, where the coppermine script is hosted, belongs actually to a friend of mine. But he has 10 MySQL DB I think, so it is no problem to get one of those  ;D

I've never heard about these regulations from webhosters, so next time I'll be smarter  8)!
THX,
SCS
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.