2
votes

After reading several posts and watching numerous videos on the topic, I remain unable successfully to install MySQL 8.0. First, I thought the issue may have pertained to a pre-existing MySQL install. So, I purged that install in accordance with provided here: How Do I Uninstall MySQL Completely?. Once I removed MySQL, I tried to reinstall it. As an example, I followed the guidance provided here: How to Install MySQL 8.0 on Ubuntu 18.04 LTS Bionic Beaver. My install failed at the point presented in the 1:06 mark in the video, after the following statement:

"Setting up mysql-community-server (8.0.11-1ubuntu18.04)..." (with one minor exception: mine reads "...(8.0.12-...")

After this point my attempted installation reported a series of errors:

update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted! mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

dpkg: error processing package mysql-community-server (--configure): installed mysql-community-server package post-installation script subprocess returned error exit status 1

dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-community-server (= 8.0.12-1ubuntu18.04); however: Package mysql-community-server is not configured yet.

This error made no sense, since the directory was created during the installation process:

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

I read elsewhere that one possible issue is that the installation process neglects to append the 'mysqld.cnf' file name at the end of an '!include' directive in the MySQL database server configuration file. (See: Why Is /etc/mysql/my.cnf EMPTY?.)

In my case the file was not empty, but configuration file name was missing. So, I altered this from:

includedir /etc/mysql/mysql.conf.d/

...to...

includedir /etc/mysql/mysql.conf.d/mysqld.cnf

Unfortunately, this did not resolve the issue.

Your recommendations are appreciated.

1

1 Answers

0
votes

Sorry for this post. I really don't convinced about my answer. I also got this same problem. Then I uninstall the "libaio1" package then install the same package and it works for me.

It works well in AWS EC2 insurances.+ My home PC. Buy not working in Google cloud VM instances.