title: MariaDB installer on Linux changing the custom db file ownership to default mysql and causing database to go down
body: <p>When I run sudo apt upgrade, the MariaDB package installer will attempt to upgrade MariaDB but it'll change the database file ownership to default user 'mysql'.  Since the file ownership got changed, MariaDB will fail to restart.</p>
  <p>I've several servers configured with the same setup, but this problem is only seen in a few of them. I don't know how to configure the installer so that it does not change the file owner to default mysql.</p>
  <p><strong>Environment:</strong></p>
  <ul>
  <li>Linux Ubuntu 18 LTS</li>
  <li>MariaDB 10.3</li>
  </ul>
  <p><strong>MariaDB setup:</strong></p>
  <ol>
  <li>Configured MariaDB to run as 'mydbuser'  rather than the default 'mysql'.</li>
  <li>Intalled dbfiles in /mydir/mariadb/.</li>
  <li>File and dir ownership from /mydir/mariadb/ is set to mydbuser:mydbgroup.</li>
  </ol>