Jump to content

Recommended Posts

Posted

Hi There,

 

I am trying for couple of days to log in to the database - phpMyadmin at http://hedhakrayotsite.heliohost.org/

and my php file can't connect to the DB.

 

I get this message :

---------------------

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'stevie.heliohost.org' (4) in /home/hkrayot/public_html/admin/connection_2hed_akrayot_DB.php on line 12

THERE WAS NO CONNECTION TO THE DB

 

here is my code:

/*******************************************************/

/************** CONNECT TO DB **************************/

/*******************************************************/

 

$cfgServerHost = 'stevie.heliohost.org:2082'; // MySQL hostname

$cfgServerUser = 'hkrayot_hkrayo'; // MySQL user

$cfgServerPassword = 'XXXX'; // have a correct MySQL password

$cfgDbDatabase ='hkrayot_hedhakrayot' // I TRYED ALSO 'hedhakrayot'; // MySQL database name

 

mysql_connect($cfgServerHost, $cfgServerUser, $cfgServerPassword) OR

die('THERE WAS NO CONNECTION TO THE DB');

mysql_select_db($cfgDbDatabase) OR die('I COULD NOT FIND YOUR DB');

Posted

You are trying to start a MySQL connection to cPanel. Not going to work.

 

Use "localhost" for $cfgServerHost.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...