mysql ocp 1z0-888 每日一题(3)

10月3号

MySQL is installed on a Linux server and has this configuration:
[mysqld]
user=mysql
datadir=/data/mysql/
As the ‘root’ user, you 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 needs to be run as the root user, but files cannot be owned by it.
B. The mysqld process requires all permissions within datadir to be the same.
C. MySQL cannot be run as the root user.
D. MySQL requires correct file ownership while remaining secure.


A.只是拷贝数据文件是无法用root启动的,会报错
B.应该不需要全部权限就能启动的,chmod -R 775即可
C.mysql的root用户和外边的用户启动是没关系的
D.mysql需要文件权限来启动

Answer: A(应该是D)

猜你喜欢

转载自blog.csdn.net/AkiFreeman/article/details/84963186