note 72559 deleted from function.mysqli-connect by hholzgra

From: Date: Sat, 29 Sep 2007 10:37:16 +0000
Subject: note 72559 deleted from function.mysqli-connect by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130914@lists.php.net to get a copy of this message
Note Submitter: jcwebb at dicoe dot com ---- PHP520, MYSQL5027, WinServer2003r2 i created a database with no tables i created a user with no privileges (testuser,testpw,localhost) <?php $MYhostname="localhost"; $MYusername="testuser"; $MYpassword="testpw"; $MYdatabase="mysqlitest"; $MYlink=mysqli_connect($MYhostname, $MYusername, $MYpassword, $MYdatabase) or trigger_error(mysqli_connect_error(),E_USER_ERROR); printf("Host information: %s\n", mysqli_get_host_info($MYlink)); mysqli_close($MYlink); ?> This gave an Access Denied error. But it works with mysql_connect() !!!!!!!!!!!!! Solution: give the user a GLOBAL SELECT privilege or create a table and give a SELECT priviledge to the table. Hope this helps.

« previous php.notes (#130914) next »