devWhiz Posted April 14, 2011 Share Posted April 14, 2011 If the script is not uploaded onto the server you cant use $dbc = mysql_connect('localhost', 'username', 'pass'); so how could I connect in cli? this did not work $dbc = mysql_connect('http://123.456.789.10', 'username', 'pass'); So what can I do? Thanks Link to comment https://forums.phpfreaks.com/topic/233698-connecting-to-a-site-database-in-cli/ Share on other sites More sharing options...
requinix Posted April 14, 2011 Share Posted April 14, 2011 Just "12.34.56.78" for the hostname. Nothing else. If it doesn't work then the machine and/or MySQL isn't configured to allow remote connections. Link to comment https://forums.phpfreaks.com/topic/233698-connecting-to-a-site-database-in-cli/#findComment-1201479 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.