Created on 14 Aug 2018 ;    Modified on 14 Aug 2018 ;    Translationitalian

A suggestion to install MySQL 8 on Windows 10

This blog, until the early months of 2018, was implemented with Drupal 7 on a data base MySQL (ver.7.x).

When I decided to republish it using a different tool, I needed to extract the contents of the articles from the MySQL DB.

For this purpose I installed MySQL 8 community edition on my computer, which uses MS Windows 10 Pro.

I have performed a development installation, which loads the server DB engine and useful tools to develop applications that uses it. I requested that the DB server started as a Windows service, using the user proposed by the installer. And I left select the default choices regarding the direcory in which to install [1].

Under these conditions, in my system, I have observed the following behavior. When installing the software the MySQL server (usually) it started, but after some time (a few days) it became impossible connect to the DB. For example, the classic command:

mysql -u root -p -h localhost

that connects the root user to the db in the system localhost (ie your PC), answered with the error:

ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server

Once this condition has been triggered, I have not found a way to solve it.

Only possibility: uninstall everything (and I mean everything: even deleting the installation directory) and then reinstall. Usually, and I underline: usually (it does not always happen), everything starts again. With considerable waste of time, not to mention that if you haven't backed up the database, you're in a big trouble.

To avoid this, I had to use as installation directory another standard directory. Usually in MS Windows systems I create the c:\bin directory as the root on which to load software who is not comfortable with C:\Program Files [2]. Well, using c:\bin as the root directory for the installation, I don't experienced more problems connecting to the MySQL service.

[1]I suspect that the problem is triggered by this conditions: user to start the service, and standard installation directory. In fact the latter is a subdirectory of C:\Program Files. For security reasons, in the latest versions of its operating systems, Microsoft severely restricts the management rights of C:\Program Files.
[2]For example, there are programs that do not digest the use of spaces in own directories. And in C:\Program Files there is a space. This counts also in localized versions. Do not be fooled by `` C:Programmi``: it's fake; however, the system inside uses C:\Program Files.