Im stuck..how do I connect to SQL

bladewarriors

New Member
Messages
7
Reaction score
0
Points
0
Isnt there a way to connect to my website with sqlyog or navicat?
I have ad-enhanced website.
I have on user and password etc but i dont know why it doesn work..im new on x10hosting
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
You have to add your Static Ip in Remote SQL Section of cPanel and Pm Corey to add your IP in Firewall allow list for MySQL Server.
 

naim4u

New Member
Messages
51
Reaction score
0
Points
0
you should use this tag to connect to your mysql server:

<?php



define('DBUSER','rootusername);

define('DBPASS','yourpassword');

define('DBNAME','databasename');

define('DBHOST','localhost');



mysql_connect(DBHOST,DBUSER,DBPASS) or die(mysql_error());

if(!mysql_select_db(DBNAME)){

echo 'Unable to select database.'.mysql_error();

exit;

}



?>



like this in your php fileeeeee if you use remote site :rename localhost to you sqlhost server.
 
Top