Thank you for pointing that out.
I finally found it.
Now I'm having a new problem.
When I was using an older version of MySQL, I was able to change the datadir to a new location, reset the server, and it would load the databases in the new location.
Now when I change the location of the datadir, I'm getting a bunch of errors:
For example, I change this:
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql/
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
To this:
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /New_Directory/mysql/
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
and I get this error:
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
Running "systemctl status mariadb.service" returns this:
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Wed 2018-09-26 13:17:36 UTC; 1min 6s
Process: 3642 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_STAR
Process: 3638 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUC
Process: 5747 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WS
Process: 5655 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR
Process: 5649 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START
Process: 5643 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/ru
Main PID: 5747 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Sep 26 13:17:35 rock64 systemd[1]: Starting MariaDB database server...
Sep 26 13:17:36 rock64 mysqld[5747]: 2018-09-26 13:17:36 548003549184 [Note] /us
Sep 26 13:17:36 rock64 mysqld[5747]: 2018-09-26 13:17:36 548003549184 [Warning]
Sep 26 13:17:36 rock64 systemd[1]: mariadb.service: Main process exited, code=ex
Sep 26 13:17:36 rock64 systemd[1]: Failed to start MariaDB database server.
Sep 26 13:17:36 rock64 systemd[1]: mariadb.service: Unit entered failed state.
Sep 26 13:17:36 rock64 systemd[1]: mariadb.service: Failed with result 'exit-cod
lines 1-19/19 (END)
I'm seriously at a loss here, so I would really appreciate if someone could point me in the right direction. Or even send me to a tutorial that would actually work.
Things I've done so far:
copied the contents of the original database director to the new one using rsync
tried reinstalling and starting over from scratch
tried changing the location of the .pid and .sock files
done a chown mysql on all files and directories concerned
created new .pid and .sock files