1. Create a CentOSMysql user group [root @ localhost ~] # Grepmysqletcgroup # If the user group mysql exists in the query system, add the user group if no user group exists. [Root @ localhost ~] # Groupaddmysql # Add a user group named Mysql 2. Create a CentOSMysql user [root @ localhost ~] # Grepmysqletc
1. Create a CentOS Mysql user group [root @ localhost ~] # Grep mysql/etc/group # Check whether the user group mysql exists in the system. If no user group exists, add the user group. [Root @ localhost ~] # Groupadd mysql # Add a user group named Mysql 2. Create a CentOS Mysql user [root @ localhost ~] # Grep mysql/etc
1. Create a CentOS Mysql user group
[Root @ localhost ~] # Grep mysql/etc/group
# QuerySystemMysql user group. If no user group exists, add it.
[Root @ localhost ~] # Groupadd mysql
# Add a user group named Mysql
2. Create a CentOS Mysql user
[Root @ localhost ~] # Grep mysql/etc/passwd
# QuerySystemIf there is a user named mysql in, add it if there is no such user.
[Root @ localhost ~] # Useradd mysql-g mysql-M-s/sbin/nologin
# Add a user named CentOS Mysql.
-G: Specifies the user group to which the new user belongs)
-M: do not create a root directory
-S: defines the shell it uses./sbin/nologin indicates that the user cannot log on.System.
I have explained MYSQL compilation and installation before, so the installation steps are omitted here.