Jump to content

Remote MySql


Xeon-YK

Recommended Posts

hi..., i wan't to ask how to remote to mysql
i have make a php application and i want to use mysql for the database in different computer, the computer ip is 10.20.37.77 and mysql port 3306, the password = "root"

here is the code

$MySQL_Username = "root";
$MySQL_Host = "10.20.37.77";
$MySQL_Passwd = "root" ;
$MySQL_DB = "squid";
$db = mysql_connect( $MySQL_Host , $MySQL_Username , $MySQL_Passwd ) ;

the error :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'xeon' (using password: NO) in D:\Program

if the php application use mysql in localhost it work
$MySQL_Username = "root";
$MySQL_Host = "localhost";
$MySQL_Passwd = "" ;
$MySQL_DB = "squid";
$db = mysql_connect( $MySQL_Host , $MySQL_Username , $MySQL_Passwd ) ;

please help me, thank you
Link to comment
https://forums.phpfreaks.com/topic/5908-remote-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.