PHP mysql_connect vs Ubuntu mysql terminal use -
PHP mysql_connect vs Ubuntu mysql terminal use -
i'm using php in order connect mysql next way:
$link = mysql_connect('...host...', '...username...', '...password...'); if (!$link) { die('could not connect: ' . mysql_error()); } echo 'connected successfully'; and connects fine. when trying terminal this
mysql -h ...host... -u ....username... -p ...password... i give password , take result this:
error 2003 (hy000): can't connect mysql server on '...host...' (111) any ideas how can solved?
try sudo mysql -h ....etc.
i'm running linuxmint , had utilize either su or sudo. think default have root come in terminal. ubuntu root inaccessible, feature don't ubuntu.
php mysql ubuntu mysql-connect
Comments
Post a Comment