CentOSMySQL startup Error

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.