MySQL Host: "Can't connect to MySQL server", but right data!!! MySQL Host: "Can't connect to MySQL server", but right data!!!
 

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

MySQL Host: "Can't connect to MySQL server", but right data!!!

Started by santacruzshores, February 21, 2005, 03:03:17 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

santacruzshores

Hi,

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

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:

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??


kegobeer

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.
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

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!

kegobeer

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.
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

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?

Joachim Müller

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:
Quote from: santacruzshores on February 21, 2005, 03:03:17 PM
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

santacruzshores

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