MySQL控制台更新数据乱码解决_MySQL
bitsCN.com
MySQL控制台更新数据乱码解决
问题:
在MySQL控制台中输入如下语句:
INSERT INTO table_name VALUES ('中文');
最终在数据库存放的数据为乱码。
解决:
添加mysql客户端连接的字符集参数。(下面我们假设数据库的编码为utf-8)
1. 在控制台启动命令之后添加字符集参数
1$ mysql --default-character-set=utf8
注意,这边的的字符集是utf8而不是utf-8。
2. 在mysql的配置文件my.cnf中添加字符集参数
在/etc/my.cnf文件中添加如下配置
1[mysql]2default-character-set=utf8
bitsCN.com

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Installing the Group Policy Management Console (also known as GPMC) on Windows 11 will be the topic of today’s post. In Windows systems, the tools we are discussing improve the management of Group Policy by making it easier for IT and system administrators to understand. Be careful not to confuse the Local Group Policy Editor (gpedit.msc) with the Group Policy Management Console (GPMC). In terms of local system settings, Gpedit works with the registry, but GPMC works with server management settings for domain-based networks. You need to download and install the Windows Remote Server Administration Tools, sometimes called RSAT, to accomplish this. Use remote server management

Have a Windows 11 touchscreen laptop that won't calibrate or doesn't work? This can be frustrating, especially if the only access option is through a device with a touch screen. While Windows touch screen devices are known for their smooth functionality, especially for graphically demanding applications, things can sometimes go wrong. You may encounter issues such as the touch screen not working properly or sometimes the Windows 11 touch screen won't calibrate at all. While we have already covered how to calibrate your touch screen on Windows 10, here we will discuss some solutions that may help you when your Windows 11 touch screen won’t calibrate. Does the touch screen work with Wind?
![Xbox System Error E200 [Fixed]](https://img.php.cn/upload/article/000/465/014/170832475129577.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
This article will explain how to resolve system error E200 on your Xbox console. Typically, this error occurs when your Xbox console gets interrupted while trying to install the latest console operating system update. This error may also occur if the system update is interrupted due to a power outage or network problem. Fix Xbox System Error E200 Use the following fix to fix System Error E200 on your Xbox console: Turn your Xbox console off and on again Perform a system update factory reset your console Let’s get started. 1] Turning your Xbox console off and on again Resetting the power cycle of your Xbox console can effectively eliminate potential temporary glitches and resolve some issues. Follow these steps to turn off and reopen Xbox Control

The Xbox gaming console is a favorite among gamers. With the new SeriesX and SeriesS, gaming is almost a lifelike experience. The Xbox controller is your primary tool for experiencing gaming effects. Sometimes the controller connection gets cut off or some errors are encountered while trying to connect the controller to the main console. This may be due to various issues related to pairing. This can be overcome with a few simple steps. Reset your Xbox Series S or Xbox Series X controller Step 1: Press and hold the Xbox button on your controller for a few seconds to turn off the controller. Step 2: On the screen, go to Turn off controller and press button A to select that option. NOTE: If you keep pressing X

Microsoft Store is one of the most important applications installed for Windows 11 users. Here you can purchase apps, games, and other content for your computer. With the launch of Windows 11, these programs also come with updated UI to match the operating system design, and Microsoft Store is not far behind. Its main purpose is to provide a unified experience for finding and downloading software and applications. You can browse categories like games, music, movies, TV shows, and more. The newly revamped store offers more services than the Windows 10 version. One of the most notable differences between the two stores is their design. Secondly, there are more applications and games, not only

There are many features and services running on Windows PC, allowing users to take full advantage of it. They are distributed throughout the system and often not accessible in one location. Therefore, the need for Windows 11 computer management is crucial as it allows you to access a range of Windows management tools to manage your computer. What is Computer Management Console? Computer Management is a set of management tools on Windows PCs that Microsoft provides for managing local and remote computers. It allows users to access many management tools such as Task Scheduler, Event Viewer, Device Manager, Disk Management, Service Manager, etc. Additionally, every management tool in console management is encapsulated and organized into a single console

There are several ways to clear the console or output screen, one of which is the clrscr() function. It clears the screen when the function is called. It is declared in the "conio.h" header file. There are some other methods such as system("cls") and system("clear"), which are declared in the "stdlib.h" header file. The following is the syntax for clearing the console in C language: clrscr();ORsystem("cls");ORsystem("clear");The following is a use

How to use the print() function in Python3.x to output content to the console. In Python, the print() function is a very commonly used function, which can output specified content to the console. This article will introduce in detail how to use the print() function to achieve this function, and attach the corresponding code examples. First, let us understand the basic usage of the print() function. The print() function can accept one or more parameters as input and put them in comma-separated form
