Why can't I login to mysql with --login-path=local?
<p>I just updated a MySQL database from 5.5 to 5.6. I'm attempting to <a href="http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html" rel="noreferrer">follow best practices</a> so I used <code>mysql_config_editor</code> to create a <code>.mylogin.cnf</code> file:</p>

<pre><code>mysql_config_editor set --login-path=local --host=localhost --user=example --password
</code></pre>

<p>However, when I try <code>mysql --login-path=local</code> I get this error:</p>

<pre><code>ERROR 1045 (28000): Access denied for user 'example'@'localhost' (using password: YES)
</code></pre>

<p>However, I can still login using <code>mysql -u example -p</code>, and then pasting the password at the prompt. I've triple-checked that I'm using the correct password in my <code>mysql_config_editor</code> command.</p>

<p>My grants look like this:</p>

<pre><code>mysql&gt; show grants;
+------------------------------------------------------------------------------+
| Grants for example@localhost                                                 |
+------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'example'@'localhost' IDENTIFIED BY PASSWORD &lt;secret&gt;  |
| GRANT ALL PRIVILEGES ON `example`.* TO 'example'@'localhost'                 |
+------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
</code></pre>

<p>This is the output to <code>/var/log/mysql/error.log</code> when I restart MySQL:</p>

<pre><code>160223 12:31:41 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160223 12:31:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2016-02-23 12:31:43 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-02-23 12:31:43 0 [Note] /usr/sbin/mysqld (mysqld 5.6.29) starting as process 31337 ...
2016-02-23 12:31:43 31337 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2016-02-23 12:31:43 31337 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2016-02-23 12:31:43 31337 [Warning] Using unique option prefix myisam_recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2016-02-23 12:31:43 31337 [Note] Plugin 'FEDERATED' is disabled.
2016-02-23 12:31:43 31337 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-02-23 12:31:43 31337 [Note] InnoDB: The InnoDB memory heap is disabled
2016-02-23 12:31:43 31337 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-02-23 12:31:43 31337 [Note] InnoDB: Memory barrier is not used
2016-02-23 12:31:43 31337 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-02-23 12:31:43 31337 [Note] InnoDB: Using Linux native AIO
2016-02-23 12:31:43 31337 [Note] InnoDB: Using CPU crc32 instructions
2016-02-23 12:31:43 31337 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-02-23 12:31:43 31337 [Note] InnoDB: Completed initialization of buffer pool
2016-02-23 12:31:43 31337 [Note] InnoDB: Highest supported file format is Barracuda.
2016-02-23 12:31:43 31337 [Note] InnoDB: 128 rollback segment(s) are active.
2016-02-23 12:31:43 31337 [Note] InnoDB: Waiting for purge to start
2016-02-23 12:31:43 31337 [Note] InnoDB: 5.6.29 started; log sequence number 1660606
SSL error: Unable to get certificate from '/etc/mysql/server-cert.pem'
2016-02-23 12:31:43 31337 [Warning] Failed to setup SSL
2016-02-23 12:31:43 31337 [Warning] SSL error: Unable to get certificate
2016-02-23 12:31:43 31337 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2016-02-23 12:31:43 31337 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2016-02-23 12:31:43 31337 [Note] Server socket created on IP: '127.0.0.1'.
2016-02-23 12:31:43 31337 [Note] Event Scheduler: Loaded 0 events
2016-02-23 12:31:43 31337 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.29'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
</code></pre>

<p>Do you see anything in the log that might indicate why I can't login using the <code>--login-path</code> option?</p>