Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql not running after upgrading mysql version

Following this link I upgraded my MySQL version from 5.5 to 5.7 on my ubuntu 14.04 droplet. But after upgrading MySQL is unable to start showing this error.

mysqld: Can't read dir of '/etc/mysql/mysql.conf.d/' (Errcode: 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

How to resolve this problem?

like image 346
baldraider Avatar asked May 03 '18 09:05

baldraider


People also ask

Why MySQL database is not connecting?

normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.

Can I upgrade MySQL version?

Step 1: Launch the Terminal. Obtain your SSH credentials and use the ssh command to log in. Step 3: Now upgrade MySQL. It'll prompt you to choose a version; select 5.7 or 8.0.

How do I update MySQL version from command line?

Learn MySQL from scratch for Data Science and Analytics First, you need to open the CMD with the help of shortcut key Windows+R key. After that, you need to reach the /bin directory. Follow the below instructions. If you are a Windows user, then use the below query to reach the /bin directory.


1 Answers

In my case AppArmor was preventing MySQL from accessing this directory. I disabled it with:

sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

I found this solution here.

Another approach would be to adjust configuration inside /etc/apparmor.d/usr.sbin.mysqld.

like image 131
adrihanu Avatar answered Sep 21 '22 08:09

adrihanu