Since MySQL 5.7 or newer the root user is using the auth_socket plugin for authentication. In that way the root user does not need a password to connect to MySQL on the localhost.   Unfortunately this causes some problems e.g. if your try to connect to the MySQL Server via an Application (e.g. PhPMyAdmin). To fix this problem you need to reset the authentication plugin for the root user and add a password.  First of all check if the auth plugin is set to auth_socket instead of mysql_