How to add mysql to the Red Hat system
The method of adding mysql in the Red Hat system: first log in to the Red Hat system as the root user; then create the mysql user and mysql group; then set the data storage directory; finally enter the mysql directory, manually execute the database initialization script and You can modify the relevant configuration files. mysql configuration file is fragmented and centralized (can be configured for multiple services) [mysql]——client configuration [mysqld]——server configuration [client]——effective for all client programs The order in which mysql reads configuration files:/etc/my.cnf –> /etc/ mysql/my.cnf–> $BASEDIR/my.cnf (usually the installation directory)–> ~/.my.cnf (the configuration file in the user’s home directory, even if the mysql user does not have Also look for the home directory) If the four configuration files found conflict, the last one shall prevail (the latter one overrides the previous oneEven without any configuration files, mysql can run, and a bunch of default configuration files are provided in the support-files directory Copy a configuration file to /etc/my.cnf cp support-files/my-large.cnf /etc/my.cnf Edit and modify the configuration file vi /etc/my.cnf It is very important to add data directory configuration information to the [mysqld] segmentdatadir = /data directory 9. Start the mysqld service service mysqld startCheck the startup statusnetstat…