title: mysqli access denied (42000/1044) linux permissions?
body: <p>I get the php error</p>
  
  <blockquote>
    <p>mysqli::mysqli(): (42000/1044): Access denied for user
    'sec_user01'@'localhost' to database 'secure_login'</p>
  </blockquote>
  
  <p>I created the database with:</p>
  
  <pre><code>CREATE DATABASE `secure_login`;
  I created the user with 
  CREATE USER 'sec_user'@'localhost' IDENTIFIED BY '**********************';
  GRANT SELECT, INSERT, UPDATE ON `secure_login`.* TO 'sec_user'@'localhost';
  </code></pre>
  
  <p>I connect to the db using</p>
  
  <pre><code> include_once 'web_psl-config.php';   // As functions.php is not included
      $mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE);
  </code></pre>
  
  <p>the config file is included successfully.
  this worked up till a few hours ago. 
  The only thing I can think of that changed is that in my php script I made some folders with 755 access. Is it possible that the permissions from the files from which this script is executed are causing this error ?</p>
  
  <p>I am really stumped.</p>
  
  <p>edit: I tested this with an ADODB connection</p>
  
  <pre><code>require('../scripts/adodb5/adodb.inc.php');
  $ADODB_CACHE_DIR = 'adodb5cache'; 
  
  $Host = "localhost";
  $Database = "secure_login";
  $Databasetype ="mysql";
  
  // lijst users en passwd
  $DbAdminUser="sec_user01";
  $DbAdminUserPassword="**************";
  
  $debug = true; //debug on
  //$debug = false; //debug off
  //admin connection
  $dbconn = ADONewConnection($Databasetype);
  $dbconn-&gt;Connect($Host, $DbAdminUser, $DbAdminUserPassword, $Database);
  
  $query="SELECT * FROM members;";
  $ammount=$dbconn-&gt;GetAll($query);
  print_r($ammount);
  </code></pre>
  
  <p>and this works. Is this some kind of bug in mysqli ?
  I really hope I don't have to rewrite to use ADODB.</p>