A pit that often falls in MySQL development-unable to start MySQL

Source: Internet
Author: User
I accidentally accidentally deleted it yesterday. Mysqldatabase, resulting in the next day NavicatOpen, all kinds of error, but it took me 2 hours to solve various bugs, here to record the following, so that later accidentally made the same mistake

Unable to start MySQL solution

Due to all kinds of mistakes, so today I cruel MySql and Navicat all removed, reinstall, after the installation, want to enter CMD mysql a valid, Need to configure the MySQL environment variable under the system, my system is WIN10, the configuration as shown
(1) Right---attribute--Advanced system settings--environment variable--path
(2) environment variable--system variable path--new environment variable--this piece of the bin path under the MySQL installation path
After configuration, net start mysql start MySQL or Computer Management-service-definition to MySQL startup, and start to report the first error.

All kinds of online search solutions, get to a useful method, in the MySQL installation directory to find my.ini files, modified default-storage-engine=INNODB default-storage-engine=MYISAM to change, restart to open MySQL

System error 5 occurred

Under cmd input net start MySQL prompt system error 5, this problem is caused by not logged in as an administrator, right-click cmd to run as an administrator (you right-click on the program, you can navigate to C:\windows\System32\CMD right-click to run as Administrator

Access denied for user ' root ' @ ' localhost ' (using password Yes)

Thought to start the MySQL, with NAVICAT can connect the database, the results also reported a mistake, this error resolution is cumbersome, the steps are as follows:
(1) Stop MySQL Service
cmd:net stop mysql
(2) Open my.ini to [mysqld] Find and add below
skip_grant_tables--Meaning to skip permission table authentication when starting MySQL service
(3) Start MySQL, enter MySQL under CMD to see the Welcome English, then enter the use mysql connection rights database as shown below
(4) Change password
update user set password=password("123456") where user="root";
(5) Refresh permissionsflush privileges
(6) Final exitquit
(7) skip_grant_tables Remove the 2nd step, restart MySQL, you can successfully

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.