CanMan2004 Posted February 1, 2007 Share Posted February 1, 2007 Hi all I have a sql database on one website which then has a connect file called dbconnect.php and I want to connect to it from another site, when I try and directly point to the connect file, I get the error failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in .... Can anyone help me? Is this possible? Thanks Ed Link to comment https://forums.phpfreaks.com/topic/36570-connecting-to-remove-sql-database/ Share on other sites More sharing options...
trq Posted February 1, 2007 Share Posted February 1, 2007 Don't bother trying to include the file. Just fill in the correct host argument for mysql_connect() from within your current script. Link to comment https://forums.phpfreaks.com/topic/36570-connecting-to-remove-sql-database/#findComment-174159 Share on other sites More sharing options...
CanMan2004 Posted February 1, 2007 Author Share Posted February 1, 2007 Hi Thanks I get the error Warning: mysql_connect(): Host 'delta.xnoc.net' is not allowed to connect to this MySQL server in When I try, am I doing something wrong? Link to comment https://forums.phpfreaks.com/topic/36570-connecting-to-remove-sql-database/#findComment-174169 Share on other sites More sharing options...
trq Posted February 1, 2007 Share Posted February 1, 2007 You need to set the correct user permissions in the mysql server to allow connections from your domain. The syntax would be something like..... GRANT ALL PRIVILEGES ON db.* TO [email protected]; where foo is your username. Link to comment https://forums.phpfreaks.com/topic/36570-connecting-to-remove-sql-database/#findComment-174195 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.