I have changed mysql data directory but there is still old path reflected
I used following method
mkdir /data/mysql
rsync -av /var/lib/mysql/ /data/mysql
Edit etc/my.cnf with following lines
datadir=/data/mysql
socket=/data/mysql/server.sock
But when im checking using
@@datadir
its showing old path
MariaDB [(none)]> select @@datadir;
+-----------------+
| @@datadir |
+-----------------+
| /var/lib/mysql/ |
+-----------------+
Please help me to solve this