desithugg Posted June 3, 2006 Share Posted June 3, 2006 umm the problem is i cant get it to connect to a db on my other website[code]<?phpmysql_connect("www.t****g.*******.com", "*****", "******") or die("Could not connect: " . mysql_error());mysql_select_db("tpf");$result = mysql_query("SELECT thing FROM signup where username = 'desithugg'");if (!$result) { echo 'Could not run query: ' . mysql_error(); exit;}$row = mysql_fetch_row($result);$thing = $row[0];if ($thing == "") { $thing = "None"; }echo $thing;?>[/code]i think its because i cant get it to grant access to the webiste i used this query [code]GRANT ALL ON database. * TO '*******'@'www.t****g.******.com' IDENTIFIED BY '*******' [/code]when i execute that GRANT query it gives me [code]#1044 - Access denied for user '******'@'localhost' to database 'tpf' [/code]it keeps denying the query but the username and password is right Link to comment https://forums.phpfreaks.com/topic/11113-mysql-connect-from-another-domain/ Share on other sites More sharing options...
fenway Posted June 3, 2006 Share Posted June 3, 2006 It's possible you don't have GRANT permissions; is this DB on the same machine? Link to comment https://forums.phpfreaks.com/topic/11113-mysql-connect-from-another-domain/#findComment-41583 Share on other sites More sharing options...
desithugg Posted June 4, 2006 Author Share Posted June 4, 2006 [!--quoteo(post=379755:date=Jun 3 2006, 06:42 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 3 2006, 06:42 PM) [snapback]379755[/snapback][/div][div class=\'quotemain\'][!--quotec--]It's possible you don't have GRANT permissions; is this DB on the same machine?[/quote]no they are 2 different websites1)www.***.byethost32.com2)www.***.byethost2.comi wanna connec to the database of site #1 from site #2 Link to comment https://forums.phpfreaks.com/topic/11113-mysql-connect-from-another-domain/#findComment-41611 Share on other sites More sharing options...
fenway Posted June 4, 2006 Share Posted June 4, 2006 It's possible that the host has not permitted non-localhost connctions -- that's why I asked if they were on the same box or not. Link to comment https://forums.phpfreaks.com/topic/11113-mysql-connect-from-another-domain/#findComment-41778 Share on other sites More sharing options...
desithugg Posted June 5, 2006 Author Share Posted June 5, 2006 [!--quoteo(post=379951:date=Jun 4 2006, 12:57 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 4 2006, 12:57 PM) [snapback]379951[/snapback][/div][div class=\'quotemain\'][!--quotec--]It's possible that the host has not permitted non-localhost connctions -- that's why I asked if they were on the same box or not.[/quote]o.o lol you were right my host doesnt permit me to grant permissions to non-localhost Link to comment https://forums.phpfreaks.com/topic/11113-mysql-connect-from-another-domain/#findComment-41918 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.