Celeb Glow
updates | April 03, 2026

Problems with MySQL after moving data directory previously worked

I'm using Ubuntu 18.04 LTS 64-bit and I'm really been struggling with this - can anyone tell me where I'm going wrong?

I've had my MySQL files on a separate big disk for ages but the said big disk died suddenly. So I put a new disk in new and gleaming 3TB of it. For complicated reasons to do with a company whose name reminds you of a big South American river I actually ended up with 2 3TB disks.

I had to reinstall the server as all the copies of my data directory had got clobbered. I did have backups of my databases, don't worry.

However after reinstalling the server and changing the apparmor file and the data files directory as described in various places as I had before, mysql won't start.

If I try sudo /usr/sbin/mysqld it says:

2019-09-20T09:35:09.083922Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27) starting as process 16284 ... 2019-09-20T09:35:09.085612Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

If I try setting it back everything is fine. But the /var/lib/mysql filesystem isn't big enough.

I've tried keeping the mysql config the same and doing a symlink from /var/lib/mysql to /bigdisk/mysql that still fails. All the permissions seem right

Please help because I've just had 2 big disks put in and I can't use them!

I noticed that I now seem to be dealing with MySQL "community server" does that mean anything?

4

1 Answer

Apologies after all that wrestling the solution was very simple.

When I formatted the disks (from the "disks" gui it helpfull created the root directory owned by me (so I could see things in it as well as root but no one else) and with permissions 700.

Makde that 755 owned by root and all was sweetness and light.

Typically I discovered that doing something else (trying to get Virtualbox to work).

So sorry for annoying everyone.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy