Home Database Mysql Tutorial Share the method of installing Mysql5.7.17 under Windows and setting the encoding to utf8

Share the method of installing Mysql5.7.17 under Windows and setting the encoding to utf8

Mar 22, 2017 pm 02:15 PM

This article mainly introduces the method of installing Mysql5.7.17 under Windows and setting the encoding to utf8. It is very good and has reference value. Friends who need it can refer to it.

Download

mysql official download select Windows (x86, 64-bit), ZIP Archive

Installation

1. Unzip it here to the root directory of drive D

2. Initialize

Mysql5.7 will not be there by default data directory, so the initialization command has changed

Open cmd and enter the bin directory of mysql. Subsequent commands must be run in the bin directory (even if environment variables are configured)

mysqld-- initialize-insecure After this method is initialized, the root user has no password

mysqld--initialize --console. After this method is initialized, the root user has a password. The password is a string output in the console (remember this string)

Both of these two commands can be used here. The first one

3.mysqld --install requires a successful installation prompt. Go to the next step

4. Start the service: net start mysql

5. Log in: mysql -u root -p No password

Change password

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
Copy after login

Change encoding

1. Copy my.default.ini and rename it to my.ini

2.my.ini Add the following code to the corresponding location

[client] 
default-character-set=utf8 
[mysqld]
character-set-server=utf8
Copy after login

3. Restart MySQL

mysqld restart
Copy after login

4. Query encoding

show variables like ‘character%';

+--------------------------+----------------------------------------+
| Variable_name   | Value         |
+--------------------------+----------------------------------------+
| character_set_client  | utf8         |
| character_set_connection | utf8         |
| character_set_database | utf8         |
| character_set_filesystem | binary         |
| character_set_results | utf8         |
| character_set_server  | utf8         |
| character_set_system  | utf8         |
| character_sets_dir  | D:\mysql-5.7.17-winx64\share\charsets\ |
+--------------------------+----------------------------------------+
Copy after login

Other commands

1. Delete the mysql service sc delete mysql

2. Start the mysql service net start mysql

3. Stop the mysql service net stop mysql

The above is the detailed content of Share the method of installing Mysql5.7.17 under Windows and setting the encoding to utf8. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How many bytes do utf8 encoded Chinese characters occupy? How many bytes do utf8 encoded Chinese characters occupy? Feb 21, 2023 am 11:40 AM

UTF8 encoded Chinese characters occupy 3 bytes. In UTF-8 encoding, one Chinese character is equal to three bytes, and one Chinese punctuation mark occupies three bytes; while in Unicode encoding, one Chinese character (including traditional Chinese) is equal to two bytes. UTF-8 uses 1~4 bytes to encode each character. One US-ASCIl character only needs 1 byte to encode. Latin, Greek, Cyrillic, Armenian, and Hebrew with diacritical marks. , Arabic, Syriac and other letters require 2-byte encoding.

What to do if node utf8 Chinese characters are garbled What to do if node utf8 Chinese characters are garbled Feb 08, 2023 am 10:29 AM

Solution to garbled Chinese characters in node utf8: 1. Check the type of "SarchName" through "typeof"; 2. Use "Name=iconv.decode(name,'gbk')" to convert the encoding to utf8.

How to solve Windows worm virus How to solve Windows worm virus May 17, 2023 pm 07:22 PM

0x00 Preface The worm is a very old computer virus. It is a self-contained program (or a set of programs) that usually spreads through the network. Every time it invades a new computer, it is on this computer. Makes a copy of itself and automatically executes its own program. Common worms: Panda Burning Incense Virus, Shock Wave/Shock Wave Virus, Conficker Virus, etc. 0x01 Emergency Scenario One morning, the administrator found at the egress firewall that the internal network server continued to initiate active connections to overseas IPs. The internal network environment was unable to connect to the external network, and there was no way to figure it out. 0x02 event analyzes the server's intranet IP seen on the egress firewall. First, disconnect the virus-infected host from the intranet, then log in to the server, open D-shield_web scan and check

Detailed graphic tutorial for installing Windows 10 tablet system Detailed graphic tutorial for installing Windows 10 tablet system Jul 14, 2023 am 09:33 AM

Tablet computers are currently very popular computers among many young people. Recently, many friends want to know how to install the Windows 10 tablet system, so today I will share with you a very simple one-click method to install Windows 10. Let’s take a look below! Detailed graphic tutorial for installing Windows 10 tablet system: 1. We search and download Xiaobai’s one-click reinstallation system software, choose to download and install the Win10 operating system, and click to install this system. 2. Wait for Xiaobai to download and deploy the environment. 3. After the deployment is completed, click Restart Now. 4. Choose to enter the Xiaobai pe system. 5. After entering the pe system, the installation tool will pop up to help us automatically reinstall the system. We do not need any operations.

Windows 10 reinstall win7 system tutorial Windows 10 reinstall win7 system tutorial Jul 08, 2023 pm 05:45 PM

Many friends are not used to using the win10 system and want to reinstall the win7 system, but they don’t know how to start. The editor will teach you this simple method below. Friends who don’t know how to reinstall windows7 on the computer should not miss it. 1. First, we open the computer browser and search the official website of Magic Pig One-Click System Reinstallation, download it and open it. 2. After downloading, we open it and click online reinstallation. 3. Next, we will wait patiently for it to be installed. 4. The installation is complete. Next we need to click to restart the computer now. 5. After restarting the computer, we still need to return to the main interface to continue completing the installation. Then our installation is completed. The above are the steps for reinstalling the win7 system in windows 10. I hope it will be helpful to everyone.

How to implement vulnerability analysis of Disk Pulse Enterprise Window application How to implement vulnerability analysis of Disk Pulse Enterprise Window application May 18, 2023 pm 03:04 PM

1. Vulnerability Introduction DiskPulseEnterprise is a software that monitors disk changes. It can connect and manage the software through a management port 9120 or web management window 80 to monitor disk changes. There is a dynamic link library libspp.dll in DiskPulse Enterprise, which contains some functions responsible for HTTP operations. The problem occurs in this dynamic link library. When processing the post data, there is no strict length control on the post data, resulting in When executing the acquired data, it copies data to invalid memory, causing buffer overflow, triggering SEH abnormal behavior processing, and finally controlling EIP to execute arbitrary code. Software download link: h

How to modify the username and password of a shared computer in Windows 10 How to modify the username and password of a shared computer in Windows 10 Jul 21, 2023 am 11:05 AM

At work, we often use computer sharing functions. Recently, many friends have asked me how to change the username and password of a shared computer in Windows 10, so today I will share with you how to change the username and password of a shared computer in Windows 10. Nothing is more important than this, let's learn it together! How to modify the username and password of a shared computer in Windows 10: 1. Press the win key + r key, enter control and click OK. 2. Click on User Account. 3. Click Credential Manager. 4. Click Windows Credentials. 5. The certificate in the share is this certificate. Click Edit to make changes. The following is how to change the username and password of a shared computer in Windows 10.

What should I do if my computer shows that this version of Windows 10 will be shut down? What should I do if my computer shows that this version of Windows 10 will be shut down? Jul 08, 2023 pm 08:02 PM

What should I do if my computer shows that this version of Windows 10 will be shut down? Recently, many friends have been using the Win10 system, and suddenly a message pops up on their computer: "Your Windows 10 version is about to be restarted and the service will be stopped. In fact, this is a new notice from Microsoft that the current version of Win10 will be stopped." service items, so what should we do when faced with such a thing? The editor below will remind everyone that this version of Windows 10 will be closed when the computer appears. The computer appears that this version of Windows 10 will be shut down. Solution 1: Select upgrade 1. Click the "Menu Bar" icon and select "Settings" to enter; 2. Directly select "Upgrade and Security" in the settings interface to enter; 3.

See all articles