I installed MySQL 5.7 Innodb Cluster using :
https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
During the installation i have configured the mysql to use /mysql_data as datadir
[]# mysqld --initialize -u mysql --datadir /mysql_data
[]# cd /mysql_data
[]# ls -l
total 110628
-rw-r----- 1 mysql mysql 56 Apr 12 16:37 auto.cnf
-rw-r----- 1 mysql mysql 420 Apr 12 16:37 ib_buffer_pool
-rw-r----- 1 mysql mysql 12582912 Apr 12 16:37 ibdata1
-rw-r----- 1 mysql mysql 50331648 Apr 12 16:37 ib_logfile0
-rw-r----- 1 mysql mysql 50331648 Apr 12 16:37 ib_logfile1
drwxr-x--- 2 mysql mysql 4096 Apr 12 16:37 mysql
drwxr-x--- 2 mysql mysql 8192 Apr 12 16:37 performance_schema
drwxr-x--- 2 mysql mysql 8192 Apr 12 16:37 sys
Yet, after the installation complited i have notice that the datafiles created in the defualt location :
mysql> select @@datadir;
+-----------------+
| @@datadir |
+-----------------+
| /var/lib/mysql/ |
+-----------------+
1 row in set (0.00 sec)
Please explain why it happened ?