Linux installation MySQL problem summary (a) Mysqld_safe mysqld from PID File/usr/local/mysql/data/mysql.pid ended

Source: Internet
Author: User
Tags mysql version mysql login

Install MySQL database under Linux

Linux version: CentOS release 6.8 (Final)

MySQL version: mysql-5.7.16-linux-glibc2.5-x86_64.tar.gz

In the installation database, enter the start MySQL command:/usr/local/mysql/support-files/mysql.server start

Error message

Enterthe/usr/local/mysql/data directory to view the error log:

On the Internet to find solutions, tossing a turn or not, and later found in the initialization of the database step has been an error message:

Because there are files in the data file directory, which causes initialization to terminate, you must change the data directory to the owner of MySQL in case the data file directory is empty, the command is as follows:

1. Enter the Data directory:

2. Clear the Data directory:

3. Initialize the database:

In the red box above is a randomly generated MySQL login password

Then command:/usr/local/mysql/support-files/mysql.server Start, start the MySQL database.

Finally, change the root password:

# mysql–u root–p ---Connect mysql, enter the password generated when initializing

mysql> alter user ' root ' @' localhost ' identified by ' 123456 ';

Linux installation MySQL problem summary (a) Mysqld_safe mysqld from PID File/usr/local/mysql/data/mysql.pid ended

Related Article

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.