Mysql has been installed in CentOS recently and is automatically started by running the following command # cpusrlocalmysqlsharemysqlmysql. serveretcinit. dmysql
Mysql has been installed in CentOS recently and is automatically started by running the following command: # cp/usr/local/mysql/share/mysql. server/etc/init. d/mysql
Mysql has been installed in CentOS recently. Run the following command to add it to the System for Automatic startup:
# Cp/usr/local/mysql/share/mysql. server/etc/init. d/mysqld
# Chkconfig -- add mysqld
# Chkconfig mysqld on
But it always fails at startup, and then you can view the system log file.
# Less/var/log/mysqld. log
Mysql user is found by default, but I did not create this user. The user is directly created by the root user, so an error occurs.
Create a mysql user
# Groupadd mysql
# Useradd-g mysql: mysql
And assign Permissions
# Chown-R root: mysql/usr/local/mysql
Reuse mysql user-initiated Database
#/Usr/local/mysql/bin/mysql_install_db -- user = mysql
Restart the system. mysql can be started automatically.