title: cant connect php with ms access database on linux
body: <p>I have install <code>unixodbc</code> and <code>libodbc</code> in <code>ubuntu 14.0</code> and configured it here is the configuration </p>
  
  <pre><code>/etc/odc.ini 
  [MyDriver]
  Description = MyDriver Driver for MyDBMS
  Driver      = /path/to/libmyodbc.so
  Setup       = /path/to/libmyodbcs.so
  FileUsage   = 1
  UsageCount  = 1
  </code></pre>
  
  <p>and data source configuration </p>
  
  <pre><code>[MyDataSource]
  Description = The Source of My Data
  Driver      = MyDriver
  ServerName  = localhost
  Database    = MyDatabase
  UserName    = admin
  Password    = something
  </code></pre>
  
  <p>and here is the php code </p>
  
  <pre><code>$query = 'SELECT * FROM MyTable';
  $mdb_file = '/path/to/example.mdb';
  $uname = explode(" ",php_uname());
  $os = $uname[0];
  switch ($os){
    case 'Windows':
      $driver = '{Microsoft Access Driver (*.mdb)}';
      break;
    case 'Linux':
      $driver = 'MDBTools';
      break;
    default:
      exit("Don't know about this OS");
  }
  $dataSourceName = "odbc:Driver=$driver;DBQ=$mdb_file;";
  $connection = new \PDO($dataSourceName,'','');
  $result = $connection-&gt;query($query)-&gt;fetchAll(\PDO::FETCH_ASSOC);
  print_r($result);
  </code></pre>
  
  <p>But it through access denied for user root then if i enter username of sql 
     it connect with sql </p>