My SQL 1067 error and encoding solution, sql1067

Source: Internet
Author: User

My SQL 1067 error and encoding solution, sql1067

Most of My SQL statements use the green version (extract version) and then register the service for convenience.

However. Configuration files have a headache.

First, configure the mysql environment variable.

MySQL environment variables (my computer-right-click Properties-advanced-environment variables)

MYSQL_HOME (decompression path): E: \ MYSQL \ mysql-5.6.23-winx64

Path: Add at the end; % MYSQL_HOME % \ bin note semicolon

When the environment variable CMD is not added, it is not an internal external command.

Used by the landlord. 5.6.23.

The my-default.ini content is as follows

[Mysqld] # skip-grant-tables, which can be used to log on to mysql with the root password forgotten. The security is extremely low. # Port = 3306 # in some versions, default-character-set = utf8 can solve Chinese garbled characters # here, do not use default-character-set = utf8 to directly report the 1067 Error character -set-server = utf8 # note that this must be added without adding client database results to GBK or latin1init_connect = 'set NAMES utf8' # show variables like 'Char % '; view the database sequence set # Some versions of the database storage engine default-storage-engine = MyISAM will start normally or 1067 default-storage-engine = INNODB will be reported otherwise # Set basedir to point to the mysql installation path basedir = e: \ MYSQL \ mysql-5.6.23-winx64datadir = E: \ MYSQL \ mysql-5.6.23-winx64 \ data [client] default-character-set = utf8 # password = 1234 port = 3306 [mysql] port = 3306default-character-set = utf8

------------------------------------------------------------------------------- Do not copy this line

There is basically no garbled problem.

Enter mysq... bin \ to run as Administrator

Specify the configuration file and add the service

mysqld --install MySQL --defaults-file="E:\MYSQL\mysql-5.6.23-winx64\my-default.ini"

Start mysql

Net start mysql

Mysql-u root-p is empty by default.

Use Navicat for MySQL to connect to the database.

The registration code: NAVH-WK6A-DMVK-DKW3

Switch to use mysql

select * from mysql.user;

Similar records are displayed.

No Password is required. First, kill the localhost 4th records. (Anonymous logon)

If you do not change the table. There will be situations

After deleting 4th entries.

This requires verification. Prompt for user name

Remember not to open the skip-grant-tables on the my-default.ini.

Change the default root password (switch to the root directory)

set password for root@localhost = password('111');update user set password=password("111") where user="root";

Test is available. Restart service

At this time, log on. Password required

Just enter the 111 password.

Note:

If you use cmd to log on, log on in the following format:

mysql -u root -p111 

Do not use:

mysql -u root -p 111

Otherwise, the following message is displayed:

First come here. Install the service and solve all the password problems.

Hope to help friends in need. If the encoding problem is not solved, it is really a headache. Chinese

Figure 1067.

If you have configured relevant attributes before. Delete all non-folder files under mysql-data. Start

The above is a small series of Solutions to My SQL 1067 errors and encoding problems. I hope it will help you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.