Mysql Installation Problems

Source: Internet
Author: User

Operating System: win7

Mysql version: mysql 5.5 (64-bit)

1. Re-installing mysql stops at the last step.

Problem description: After mysql is installed for the first time, Chinese characters written using jdbc are garbled, but Chinese data already in the database is normal. The problem still cannot be solved after the character encoding is changed, so I decided to reinstall it. However, the reinstallation was stuck in the last step, and I checked it online. The steps to solve the problem are as follows:

(1) Search for mysql in the Registry and delete related records;

(2) Delete the mysql file in the mysql installation directory;

(3) Delete the mysql folder under the C:/ProgramData directory

Then reinstall the agent. The installation is successful.

2. mysql-uroot-p cannot be logged on

Problem description: You can be sure that the password is correct, but it cannot be connected. Then, close the mysql service and start it with mysqld -- skip-grant-tables. The connection can be established normally. The reinstallation is the same many times. Previously, the root password was set during the installation process, and later I decided not to set the password. Sure enough, I can log on normally this time, and then run the command to change the root password and connect again, normal (Note: to support Chinese characters, select utf8 for character encoding during installation ).

3. After the installation is normal, Chinese data is garbled.

After the database is installed, import the data. Because the previous data adopts gbk encoding and utf8 encoding during mysql installation, the data found is garbled. Log on to mysql, run the set names gbk command, and query again. The Chinese character is displayed normally.

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.