Connect To Mysql Db From Outside Tch?

liunx

Guest
I have another website that's not hosted from TCH. I'm trying to run a script on that website that connects to a database I have on our TCH account.<br /><br />Instead of 'localhost' I used server52.totalchoicehosting.com. Its giving me this error, w/ our username blanked of course.<br /> <br />Warning: mysql_connect(): Access denied for user '******'@'64.49.***.***' (using password: YES) in /index.php on line 278<br />Could not connect: Access denied for user '********'@'64.49.***.***' (using password: YES)<br /><br />How can I do this?<!--content-->
As I see it you need to give access to the remote site in your cpanel > MySQL Databases,<br />I did find a <a href="http://www.totalchoicehosting.com/forums/index.php?s=&showtopic=18362&view=findpost&p=121808" target="_blank">post by TCH-David</a> that may help.<!--content-->
Not that I need this information but it was nice to learn something.<!--content-->
Yes as Don has suggested, you need to add the IP from which you are trying to connect to the 'Access Hosts' list .<!--content-->
I think Geuis wants the script to access the remote mysql database, not himself from his local machine. In that case he needs to grant permission for the "mysqluser" to access the database from the "ip of the server which has the php script" <br /><br />something like this...<br /><br />mysql> grant all privileges on dbname.* to 'mysqluser'@'<ipaddress or servername' identified by 'password' with grant option; <br /><br /><br />Anand S<!--content-->
 
Back
Top