I am using MySQL Workbench and I am trying to connect to MySQL server as "root". The server is up and running and connection to MySQL has been successful. But it says Access denied for user 'root'@'localhost' (using password: NO) I don't understand what's wrong. What is this error? How am I supposed to rectify this issue? The password I am using for root@localhost is "root". The stack trace is like this:-
2016-08-20 13:45:24 - Starting server...
FROM DESKTOP-H68H24J.err:
2016-08-20T08:15:26 0 Warning TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-08-20T08:15:26 0 Warning 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2016-08-20T08:15:26 0 Note C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe (mysqld 5.7.13-log) starting as process 10280 ...
2016-08-20T08:15:26 0 Note InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-08-20T08:15:26 0 Note InnoDB: Uses event mutexes
2016-08-20T08:15:26 0 Note InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2016-08-20T08:15:26 0 Note InnoDB: Compressed tables use zlib 1.2.3
2016-08-20T08:15:26 0 Note InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2016-08-20T08:15:26 0 Note InnoDB: Number of pools: 1
2016-08-20T08:15:26 0 Note InnoDB: Not using CPU crc32 instructions
2016-08-20T08:15:26 0 Note InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
2016-08-20T08:15:26 0 Note InnoDB: Completed initialization of buffer pool
2016-08-20T08:15:26 0 Note InnoDB: Highest supported file format is Barracuda.
2016-08-20T08:15:27 0 Note InnoDB: Creating shared tablespace for temporary tables
2016-08-20T08:15:27 0 Note InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-08-20T08:15:27 0 Note InnoDB: File '.\ibtmp1' size is now 12 MB.
2016-08-20T08:15:27 0 Note InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-08-20T08:15:27 0 Note InnoDB: 32 non-redo rollback segment(s) are active.
2016-08-20T08:15:27 0 Note InnoDB: Waiting for purge to start
2016-08-20T08:15:27 0 Note InnoDB: 5.7.13 started; log sequence number 10857177
2016-08-20T08:15:27 0 Note InnoDB: Loading buffer pool(s) from C:\ProgramData\MySQL\MySQL Server 5.7\Data\ib_buffer_pool
2016-08-20T08:15:27 0 Note Plugin 'FEDERATED' is disabled.
2016-08-20T08:15:27 0 Warning Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-08-20T08:15:27 0 Note Server hostname (bind-address): '*'; port: 3306
2016-08-20T08:15:27 0 Note IPv6 is available.
2016-08-20T08:15:27 0 Note - '::' resolves to '::';
2016-08-20T08:15:27 0 Note Server socket created on IP: '::'.
2016-08-20T08:15:27 0 Note InnoDB: Buffer pool(s) load completed at 160820 13:45:27
2016-08-20T08:15:27 0 Note Event Scheduler: Loaded 0 events
2016-08-20T08:15:27 0 Note C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe: ready for connections.
Version: '5.7.13-log' socket: '' port: 3306 MySQL Community Server (GPL)
**2016-08-20T08:15:28 2 Note Access denied for user 'root'@'localhost' (using password: NO)**
2016-08-20 13:45:31 - Server start done.
2016-08-20 13:45:31 - Checking server status...
2016-08-20 13:45:31 - Trying to connect to MySQL...
2016-08-20 13:45:31 - Connection succeeded
2016-08-20 13:45:31 - Assuming server is running
2016-08-20 13:45:31 - Checking server status...
2016-08-20 13:45:31 - Trying to connect to MySQL...
2016-08-20 13:45:31 - Connection succeeded
2016-08-20 13:45:31 - Assuming server is running
2016-08-20 13:45:31 - Server is running
2016-08-20 13:45:31 - Server is running
2016-08-20 13:45:31 - Server is running
[Note] Access denied for user 'root'@'localhost' (using password: NO)which is a big issue to me: what command is generating it?/etc/init.d/mysqlscript (I'm using Percona XtraDB Cluster, so it may be a little bit different from the official MySQL package). It's theif ! mysqladmin ping &>/dev/null;thenline which causes this issue. Strange thing: it's exactly the same code in the previous release... So my guess is that my /root/.my.cnf is not read as it was before. As I can read in the init.d script, they export $HOME, so that /root/.my.cnf cannot be found. But they did it already in the previous script, and it was working fine.if [ ! $mysqld_pid ];then, which has areturn, hence never hit themysqladmincode. Maybe that's the issue. So far, the init.d script doesn't have any issue with the missing mysqladmin return (it setsping_alive=0, but handles it accordingly). So this is clearly an issue with MySQL 5.7, but has no consequences I think.