Welcome Guest, Not a member yet? Register   Sign In
Database Error
#1

[eluser]Sanity11[/eluser]
Hi,

I can't connect to the database. These settings do work with the MySQL query browser? This is what I get. Can anyone help me please?

Unable to connect to your database server using the provided settings.

Code:
$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "94.236.49.251";
$db['default']['username'] = "APSBB";
$db['default']['password'] = "******";
$db['default']['database'] = "taalquiz";
$db['default']['dbdriver'] = "mysql";
$db['default']['port'] = "3306";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

I have also tried to set pconnect to false, but it makes no difference.
#2

[eluser]pickupman[/eluser]
Have you tried via standard php mysql syntax? Sometimes you might be able to diagnose a connection with a mysql_connect(); Sometimes it can be a firewall issue, where a particular port is blocked. MySQL browser may have firewall exception, but php does not.
#3

[eluser]Sanity11[/eluser]
Thanks for the hint, I tried that, and it comes up with Can't connect to MySQL server on '94.236.49.251' (4) . I will ask the system administrator if the firewall is set up correctly.
#4

[eluser]InsiteFX[/eluser]
Usally the hostname is localhost even on a live website!

InsiteFX
#5

[eluser]pickupman[/eluser]
[quote author="InsiteFX" date="1280339223"]Usally the hostname is localhost even on a live website!
InsiteFX[/quote]
Nope, Godaddy runs a completely different server for MySQL. You have to wait for it to provisioned each time you create a new db. Most cPanel accounts will be localhost, but I have worked on several other hosts, where it's a different hostname.
#6

[eluser]Sanity11[/eluser]
Hi InsiteFX,

I know, however I have worked with databases that use different hostnames many times. This however, is the first time I have received an ip adres for a hostname.




Theme © iAndrew 2016 - Forum software by © MyBB