I installed LAMP on my Ubuntu 16.04 and it was running smooth. As I forgot my PhpMyAdmin username I tried to remove the existing all MySQL files then while reinstalling MySQL 5.7 it shows the following error. What should I do now? Please help.
tridip@tridip-HP-ProBook-440-G2:~$ sudo apt-get install mysql-server
[sudo] password for tridip:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.18-1ubuntu16.04).
The following packages were automatically installed and are no longer required:
libdbd-mysql-perl libdbi-perl libmysqlclient20 libterm-readkey-perl
mariadb-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-community-server (5.7.18-1ubuntu16.04) ...
my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 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/' (Errcode: 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/' (Errcode: 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/' (Errcode: 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/' (Errcode: 2 - No such file or directory)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
dpkg: error processing package mysql-community-server (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-community-server (= 5.7.18-1ubuntu16.04); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-community-server
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)