Question

Unable to Move MySQL DB Location - Ubuntu 18.04.3 (LTS) x64

I followed the steps below exactly and the MySQL service will not start. This is a new Droplet with NO pre-existing data.

Reference:: https://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-18-04

Here are the apps I installed which include MySQL:: apt-get install apache2 mysql-server php php-mysql libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-curl git php-bz2

Errors from JOURNALCTL -XE:: – Unit mysql.service has begun starting up. Sep 11 16:26:09 ark03 audit[2197]: AVC apparmor=“DENIED” operation=“open” profile=“/usr/sbin/mysqld” name=“/sys/devices/system/node/” pid=2197 comm=“mysqld” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0 Sep 11 16:26:09 ark03 kernel: audit: type=1400 audit(1568219169.013:320): apparmor=“DENIED” operation=“open” profile=“/usr/sbin/mysqld” name=“/sys/devices/system/node/” pid=2197 comm=“mysqld” requested_mask= Sep 11 16:26:09 ark03 audit[2202]: AVC apparmor=“DENIED” operation=“open” profile=“/usr/sbin/mysqld” name=“/sys/devices/system/node/” pid=2202 comm=“mysqld” requested_mask=“r” denied_mask=“r” fsuid=111 ouid= Sep 11 16:26:09 ark03 kernel: audit: type=1400 audit(1568219169.053:321): apparmor=“DENIED” operation=“open” profile=“/usr/sbin/mysqld” name=“/sys/devices/system/node/” pid=2202 comm=“mysqld” requested_mask=

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Nevermind. It seems I can’t read… The KB works.

I added the following to the /etc/apparmor.d/usr.sbin.mysqld file:

/proc//status r, /sys/devices/system/node/ r, /sys/devices/system/node/node/meminfo r, /sys/devices/system/node// r, /sys/devices/system/node/* r,

Attempted to start MySQL.

Sep 11 16:39:21 ark03 mysqld[22519]: Initialization of mysqld failed: 0 Sep 11 16:39:21 ark03 systemd[1]: mysql.service: Control process exited, code=exited status=1 Sep 11 16:39:22 ark03 sshd[22363]: Failed password for root from 218.92.0.207 port 19597 ssh2 Sep 11 16:39:23 ark03 systemd[1]: mysql.service: Failed with result ‘exit-code’. Sep 11 16:39:23 ark03 systemd[1]: Failed to start MySQL Community Server.

How the hell is a Chinese IP in the logs??

% Whois data copyright terms http://www.apnic.net/db/dbcopyright.html % Information related to ‘218.90.0.0 - 218.94.255.255’ % Abuse contact for ‘218.90.0.0 - 218.94.255.255’

inetnum: 218.90.0.0 - 218.94.255.255 netname: CHINANET-JS descr: CHINANET jiangsu province network descr: China Telecom descr: A12,Xin-Jie-Kou-Wai Street descr: Beijing 100088

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel