What is the purpose of changing ownership of datadir to the ‘mysql’ user?

MySQL is installed on a Linux server and has the following configuration: [mysqld]
User=mysql Datadir=/data/mysql As the ‘root’ user, change the datadir location by
executing: Shell> cp –R /var/lib/mysql/data/mysql/ Shell> chown –R mysql /data/mysql/
What is the purpose of changing ownership of datadir to the ‘mysql’ user?

MySQL is installed on a Linux server and has the following configuration: [mysqld]
User=mysql Datadir=/data/mysql As the ‘root’ user, change the datadir location by
executing: Shell> cp –R /var/lib/mysql/data/mysql/ Shell> chown –R mysql /data/mysql/
What is the purpose of changing ownership of datadir to the ‘mysql’ user?

A.
MySQL requires correct file ownership while remaining secure.

B.
MySQL needs to be run as the root user, but file cannot be owned by it.

C.
MySQL needs to be run as the root user, but file cannot be owned by it.

D.
MySQL cannot be run as the root user.



Leave a Reply 2

Your email address will not be published. Required fields are marked *