MySQL 5.7 Installation completed after the first landing several issues

Source: Internet
Author: User

Server:centos 7.0

mysql:5.7.20 MySQL Community Server (GPL)

1. Change Password after first login:

According to the choice of installation, there are mysqld_safe with Mysqld_safe, no use mysqld. The normal installation should be in the/usr/sbin directory

A) Start MySQL

Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &

b) No password entry MSYQL

Mysql-u Root MySQL

c) Change Password

UPDATE user SET password=Password (' NewPassword ') where user=' root ';

Will find this error: "Error 1054 (42S22): Unknown column ' Password ' in ' Field list '

In the latest version of MySQL, the command should read:

UPDATE user SET authentication_string=PASSWORD (' NewPassword ') where user=' root ';

D) Refresh exit

Flush privileges;

Exit

2. Each login prompt needs to change the password:

Log in after exiting and discover whatever you do will prompt

ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.

Then, you can only set it again

UPDATE user SET Password=password (' NewPassword ')

But after exiting and entering again, there will still be this hint. Very pit ...

Workaround:

UPDATE user SET Authentication_string=password (' NewPassword ') where user= ' root ' and host= ' root ' or host= ' localhost ';

It seems that all the empty passwords are set to a valid password, MySQL 5.6 does not have this limitation. 5.7, we have it now.

Flush privileges; After you exit, you won't be prompted to change your password.

3. Unable to start error

Check Mysqld.log and find the following error record

====================================

Innodb:unable to lock./ibdata1, Error:11

Innodb:check that already has another mysqld process

===================================

Root cause: Startup file, occupied by another process. In fact, most of the time, when the mysqld is restarted, the previous resources are not fully released.

Solution:

1) PS aux |grep mysq* #找到锁住资源的进程

2) Kill-s 9 process number # Kill process

3) Restart Mysqld

MySQL 5.7 Installation completed after the first landing several issues

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.