Results 1 to 2 of 2

Thread: still cannot change Mysql datadir in Ubuntu 18.04

  1. #1
    Join Date
    May 2005
    Beans
    148
    Distro
    Ubuntu 20.04 Focal Fossa

    still cannot change Mysql datadir in Ubuntu 18.04

    This has been an issue for a long time now. For several years of Mysql on Ubuntu, we have not been able to change the datadir from /var/lib/mysql to something else on another drive. This recent article for Ubuntu 18.04 and Mysql seemed to suggest that they found the solotuion, but it doesn't work:

    https://www.digitalocean.com/communi...n-ubuntu-18-04

    when the "datadir" property is changed in my.cnf for the daemon, mysqld will still not start up even if you follow all of the steps in the referenced article. Has anybody found a way to make this work?

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,618
    Distro
    Kubuntu Development Release

    Re: still cannot change Mysql datadir in Ubuntu 18.04

    Installing mysql-server creates these files on my system:

    Code:
    drwx------  5 mysql         mysql         4096 Sep 11 16:11 mysql
    drwx------  2 mysql         mysql         4096 Sep 11 16:11 mysql-files
    drwx------  2 mysql         mysql         4096 Sep 11 16:11 mysql-keyring
    drwxr-xr-x  2 root          root          4096 Jul 27 10:28 mysql-upgrade
    Make sure your alternative location has identical permissions.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •