Solve the problem that MySQL5.7 cannot log on without the data folder after installation, mysql5.7data

Source: Internet
Author: User

Solve the problem that MySQL5.7 cannot log on without the data folder after installation, mysql5.7data

After the MySQL database is upgraded to version 5.7, it is somewhat different from the previous version. There is no data folder. We all know that the MySQL database files are saved in the data folder, some people on the Internet say that they have copied a data folder of version 5.6, which is not reliable. I also tried it and can log on, but cannot change the administrator password, the following is a standard solution.

After MySQL5.7 is installed, open the cmd command window and enter the bin directory in the MySQL installation directory. Then enter the following command and press Enter:

Copy codeThe Code is as follows:
Mysqld -- initialize-insecure -- user = mysql

After running the preceding command, MySQL creates a data folder and creates a default database. The logon username is root and the password is empty. The subsequent operations are the same as those of the previous version.

Articles you may be interested in:
  • Mysql data folder location search
  • Detailed description of mysql5.5 database data directory migration method
  • Modify the MySQL 2003 database data directory in Windows Server 5.5

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.