<div dir="ltr"><span style="color:rgb(58,58,58);font-family:proxima-nova,sans-serif;font-size:15px;text-align:left;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">grep 'temporary password' /var/log/mysqld.log or mysqld_safe --skip-grant-tables</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-07-01 19:12 GMT+08:00 Colin Law <span dir="ltr"><<a href="mailto:clanlaw@gmail.com" target="_blank">clanlaw@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have installed mysql-server and then run<br>sudo mysql_secure_installation<br>which prompts me to enter a root password.<br><br>I then run<br>mysql -u root -p<br>and get prompted for the pasword but then I get<br>Access denied for user 'root'@'localhost'<br><br>I have gone round a couple of times being ultra careful with the pwd entry to no avail. The log below shows a server restart and login attempt and I can't see anything wrong.<br><br>Any suggestions gratefully received.<br><br>Colin<br><br>2018-07-01T11:05:15.498133Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_<wbr>timestamp server option (see documentation for more details).<br>2018-07-01T11:05:15.499689Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22-0ubuntu18.04.1) starting as process 15056 ...<br>2018-07-01T11:05:15.504173Z 0 [Note] InnoDB: PUNCH HOLE support available<br>2018-07-01T11:05:15.504224Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins<br>2018-07-01T11:05:15.504230Z 0 [Note] InnoDB: Uses event mutexes<br>2018-07-01T11:05:15.504235Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier<br>2018-07-01T11:05:15.504240Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11<br>2018-07-01T11:05:15.504246Z 0 [Note] InnoDB: Using Linux native AIO<br>2018-07-01T11:05:15.504491Z 0 [Note] InnoDB: Number of pools: 1<br>2018-07-01T11:05:15.504586Z 0 [Note] InnoDB: Using CPU crc32 instructions<br>2018-07-01T11:05:15.506091Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M<br>2018-07-01T11:05:15.514132Z 0 [Note] InnoDB: Completed initialization of buffer pool<br>2018-07-01T11:05:15.516438Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().<br>2018-07-01T11:05:15.528769Z 0 [Note] InnoDB: Highest supported file format is Barracuda.<br>2018-07-01T11:05:15.583667Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables<br>2018-07-01T11:05:15.583842Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...<br>2018-07-01T11:05:15.762178Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.<br>2018-07-01T11:05:15.763759Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.<br>2018-07-01T11:05:15.763783Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.<br>2018-07-01T11:05:15.764577Z 0 [Note] InnoDB: Waiting for purge to start<br>2018-07-01T11:05:15.814863Z 0 [Note] InnoDB: 5.7.22 started; log sequence number 2590746<br>2018-07-01T11:05:15.815213Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool<br>2018-07-01T11:05:15.815625Z 0 [Note] Plugin 'FEDERATED' is disabled.<br>2018-07-01T11:05:15.818372Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180701 12:05:15<br>2018-07-01T11:05:15.822701Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key<br>2018-07-01T11:05:15.822750Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306<br>2018-07-01T11:05:15.822771Z 0 [Note] - '127.0.0.1' resolves to '127.0.0.1';<br>2018-07-01T11:05:15.822823Z 0 [Note] Server socket created on IP: '127.0.0.1'.<br>2018-07-01T11:05:15.833548Z 0 [Note] Event Scheduler: Loaded 0 events<br>2018-07-01T11:05:15.833993Z 0 [Note] /usr/sbin/mysqld: ready for connections.<br>Version: '5.7.22-0ubuntu18.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)<br>2018-07-01T11:05:26.799596Z 2 [Note] Access denied for user 'root'@'localhost'</div>
<br>-- <br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/ubuntu-users</a><br>
<br></blockquote></div><br></div>