This article mainly summarizes several ways to solve php+mysql Chinese garbled problem, very practical, the need for small partners can refer to.
Multi-language support is introduced from MySQL 4.1, but the Chinese in PHP will appear garbled. No
By looking up data on the web and trying it myself, I think the following system parameters are more critical:
(1), Back_log:
requires MySQL to have the number of connections. This works when the main MySQL thread gets a lot of connection
To start the MYSQLD server from the command line, you should start the console window (or "DOS window") and enter the command:
C:> C:Program filesmysqlmysql Server 5.0binmysqld
Depending on the location of the MySQL installation in the system, the
1. To optimize the query, you should try to avoid full table scan, first consider the where and the order by the columns involved in the establishment of the index.
2. The use of!= or <> operators in the WHERE clause should be avoided as far as
My personal practice is: phpMyAdmin export utf-8 insert mode Abc.sql
FTP Abc.sql to Server
SSH to Server
Mysql-u abc-p use KKK (database name, if not on CREATE database KKK) set names ' UTF8 ' source abc.sql
Note: I see set character set UTF8;
This article is a MySQL in the Set Type field of SQL Operation knowledge for a detailed analysis of the introduction, the need for friends under the reference
copy code code as follows:
The use of fewer people, understand less people, looking
Show tables or show tables from database_name; Explanation: Displays the names of all tables in the current database Show Databases Explanation: Displays the names of all databases in MySQL shows processlist; Explanation: Displays all
The error is as follows:
Illegal mix of collations (gbk_chinese_ci,implicit)
and (gbk_bin,implicit) for operation ' = ',
SQL state:hy000, Error code:1267
Error Reason:
The encoding of the database is different from the coding of the table;
The design of MySQL index can make your database fly, greatly improve the efficiency of the database. There are a few things to note when designing a MySQL index:
1. Create an index
Indexing is especially important for queries as a major
This morning a friend said that their MySQL forgot the root password let me help to see, because no contact with MySQL so from the Internet to find information
I have succeeded in my own practice!mysql version is 5.1
Here is the information from
Mysql
MySQL escape character "\"
MySQL recognizes the following escape characters:
The
An ASCII 0 (NUL) character.
\ n
A new line character.
\ t
A locator character.
\ r
A carriage return character.
\b
A backspace.
\'
A single quotation mark ("'")
Apache|mysql just saw someone put the win under the installation steps
Just the new server on the company's website today. Spent the morning installing Mysql+php+apache.
The new version of the old edition is still a little different. Now, post the
mysql| Data | database
Www.yiz.name
================================
Several common use cases:
1. Export the entire database
Mysqldump-u user name-p database name > exported file name
Mysqldump-u wcnc-p SMGP_APPS_WCNC > Wcnc.sql
2. Export a
mysql| notes
(Note: Reprint and quote, please indicate author Saulzy)
First, view and start the MySQL service.
After installing MySQL under Windows XP, it has started the service automatically and has a shortcut connection to its client in
MySQL when the MySQL server is started, it checks its command line action to see if it should perform a login and open the appropriate log file (if it should). You can have the server generate two main types of log files:
Regular log files. It
MySQL if you want to put binary data, such as picture files and HTML files, directly stored in your MySQL database, then this article is written for you! I'll show you how to store these files through an HTML form, and how to access and use
This program can be used to browse the data in MySQL, you can do a little modification can make a good MySQL browser.
*/
/*
? cmd=db
? cmd=table&db={}
? cmd=record&db={}&table={}
*/
$host = ' localhost ';
$user = ' Test ';
$password = ';
if
1, Mysql_fetch_array ()Format: array mysql_fetch_array (int query);Successful execution returns an array that holds the value of the next record, and returns a value of False if execution fails.The returned array can be represented either by
The symptom of a damaged table is usually an unexpected interruption of the query and you can see such errors as:
"Tbl_name.frm" is locked and cannot be changed.
Unable to find file ' Tbl_name. Myi "(Errcode: ###).
Error ### from the table processor
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