title: mysql --defaults-extra-file with user/password yields "Access denied..."
body: <p>Using mysql 14.14 distr 5.7.22 on Ubuntu 16.04</p>
  
  <p>An installation script for Koha uses the following to log onto mysql and automatically create databases:</p>
  
  <pre><code>mysql --defaults-file-extra=/etc/mysql/koha-common.cnf
  </code></pre>
  
  <p>/etc/mysql/koha-common.cnf is a symlink to /etc/mysql/debian.cnf which contains</p>
  
  <pre><code># Automatically generated for Debian scripts. DO NOT TOUCH!
  [client]
  host     =  localhost
  user     =  debian-sys-maint
  password =  thepassword
  socket   =  /var/run/mysqld/mysqld.sock
  [mysql_upgrade]
  host     =   localhost
  user     =  debian-sys-maint
  password =  thepassword
  socket   =  /var/run/mysqld/mysqld.sock
  </code></pre>
  
  <p>(I have changed the password).</p>
  
  <p>When I run this command directly from the command line, I get</p>
  
  <pre><code>ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
  </code></pre>
  
  <p>If I run </p>
  
  <pre><code>mysql -u debian-sys-maint -p
  </code></pre>
  
  <p>and manually type in the password, mysql logs me in with no problem.</p>
  
  <p>It seems that mysql is reading the extra file, since it gets the username, but doesn't seem to get the password. The actual password is all alpha characters, but I have tried it with the password enclosed in single quotes.</p>