My SQL 1067 solution for error and encoding problems _mysql

Source: Internet
Author: User

My Sql is mostly in the green version (uncompressed version) and then the registration service is simple and convenient.

But. Configuration file a headache for a force.

First configure the MySQL environment variables.

MySQL environment variables (My Computer-right-click Properties-Advanced-environment variables)

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

Path: Add on the last side;%mysql_home%\bin Note semicolon

Do not add environment variable CMD will be reminded not internal external command.

Used by the landlord. 5.6.23 version.

My-default.ini content is as follows

[Mysqld]
#skip-grant-tables This can be forgotten by the root password in the case of MySQL security is very low.
#端口
port=3306
#某些版本情况下default-character-set=utf8 can solve the problem of garbled Chinese
#这里不要用default-character-set=utf8 will report directly to the 1067 error
Character-set-server=utf8
#注意这个一定要加不加client Database results are GBK or latin1
init_connect= ' Set NAMES UTF8 ' 
#show variables like ' char% '; View the database encoding set
#数据库存储引擎 Some versions Default-storage-engine=myisam will start normally Or you'll report 1067 
default-storage-engine=innodb
#设置basedir指向mysql的安装路径
basedir=e:\mysql\. mysql-5.6.23-winx64
datadir=e:\mysql\mysql-5.6.23-winx64\data
[client]
default-character-set= UTF8
#password =1234
port=3306
[MySQL]
port=3306
Default-character-set=utf8

-------------------------------------------------------------------------------This line do not copy

Basically there is no garbled problem.

Go into mysq...bin\ to run the admin body

Specify configuration file, add 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 defaults to Empty

Join the database using Navicat for MySQL.

Registration code: NAVH-WK6A-DMVK-DKW3

Switch to use MySQL

SELECT * from Mysql.user;

Will see a similar record

You can do it without the password. Kill localhost 4th record first. (anonymous login)

If you do not change the table. There will be a picture below.

After the deletion of article 4th.

This is the time to validate. Prompt for user name

Remember My-default.ini's skip-grant-tables don't open.

Modify root default password (switch to root directory)

Set password for root@localhost = password (' ");
Update user Set Password=password ("a") where user= "root";

The parental test is available. Restart Service

When you log on at this time. I need the code.

Just enter the 111 password.

Attention:

If you are logged in with CMD, please login with the following format

 
 

Remember not to use:

Mysql-u Root-p 111

Otherwise you will be prompted:

Come here first. Coding problem Installation Services, password problems are resolved.

Hope to help the needy friends. Coding problems are really a headache if not solved. Chinese

1067 figure.

If you have previously configured related properties. Please remove all files that are not folders below mysql-data-. Starting up can

The above is a small set up to introduce my SQL 1067 error and coding problem solution, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.