MySQL's default encoding is Latin1, does not support Chinese, to support Chinese need to change the database's default encoding to GBK or UTF8.
1, need to log in as root user can view the database encoding (as root user login command: >mysql-u root–
Environment
MySQL 5.1 + command line tools
problem
MySQL table field Set default value
Solve
Copy Code code as follows:
--sql:
CREATE TABLE Test (
i_a int not NULL DEFAULT 1,
Ts_b Timestamp not NULL DEFAULT now (),
C_c
Often in the process of multiple process application development, we will inevitably encounter multiple processes accessing the same resource (critical resource), which requires synchronous access to the resource by adding a global lock (that is,
The syntax for creating stored procedures in MySQL is hard to remember, unless you often deal with the storage process for the simple reason that grammar is not a trivial joke. If you control MySQL through the command line, you need to remember the
Mysqladmin is an important client of MySQL, the most common is to use it to close the database, in addition to this command can also understand the running state of MySQL, process information, process killing and so on. This article describes how to
Installation
To make the article more complete, we choose to install MySQL from the source code, it is important to note that the early version of the memory leak, so the recommended installation of the latest stable version, as of this article,
Sometimes a table or result set contains duplicate records. Sometimes it is allowed, but sometimes it needs to stop repeating records. Sometimes it needs to recognize that duplicate records are removed from the table. This chapter describes how to
Temporary tables can be very useful, in some cases, to maintain temporary data. Most importantly, the temporary tables that should be known are deleted when they terminate the current client session.
Add MySQL version 3.23 to the temp table. If you
Today, watching a Shuiyu said that his MySQL is now very slow. Asked what the situation was. Say one myisam of more than 2 G in a single table. The answer to the real rubbish.
Simple answer: Switch to a strong server. Changing the server is very
Using Perl to connect to MySQL, there are many cases on the Internet, and generally we are dbi under the Dbd::mysql this module. Here make a mask get a tips:Perl DBI MySQL's character set is UTF8Perl DBI special characters write times wrongPerl DBI
problem: in the Ubuntu system, the MySQL account is added, the database is given full operational privileges, and the database is allowed to link from the externalHowever, it is still not possible to remotely access the MySQL database.Reason: In the
First, let's look at a formula where the memory in MySQL is divided into global memory and thread memory (in fact not all, just the larger part):
Copy Code code as follows:
Per_thread_buffers=
Importing SQL today always prompts for errors
Copy Code code as follows:
ERROR 2013 (HY000): Lost connection to MySQL server during query
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect ...
ERROR 2002 (
Now there are a lot of projects, the implementation of the counter is very random, such as in the implementation of the website article clicks, is so designed datasheet, such as: "article_id, Article_name, Article_content, Article_author,
Today I am on the site management background, log in promptMySQL Error:can ' t create/write to file ' #sql_5c0_0. MyD 'MySQL Server Error:Can ' t create/write to file ' c:/windows/temp/#sql_a80_0. MyD ' (errcode:17) (1)Based on the online search
In a database, character-type data is the most, and can account for more than 80% of the entire database. It is very important to improve the performance of database to deal with character data correctly. In character data, the most used is char and
MySQL is a powerful open source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for adjusting and optimizing MySQL installation. Some of the tricks are specific to the
The implementation method of creating user and authorization in MySQL.
Operating Environment: Widnows XP Professional + MySQL5.0
First, create a user
Command: CREATE USER ' username ' @ ' host ' identified by ' password ';
Description:
Operating Environment: There are table Game_list, fields: uid,score1,score2,seat_id,last_update; The incoming parameter is I_player_detail, the passed-in value is the ID of multiple users, the previous score, after the score, Seat numbers, each
As we all know, in MySQL, if direct order by RAND (), the efficiency is very poor, because it will be executed multiple times. In fact, if the equivalent query is also in RAND (), let's take a look at the different execution plans and execution time
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