This is often the case when designing databases, for example:
There isArticleThere is a type field in the table, which stores the article type, including 1 headlines, 2 recommendations, 3 hotspots, 4 images and texts..., 12, 13, etc.
There is an
The following excerpt describes utf8_unicode_ci and utf8_general_ci In the MySQL 5.1 Chinese manual:
Currently, utf8_unicode_ci rules only support Unicode rules.Algorithm. Some characters are not supported. In addition, the combination of tags
MySQL Character Set: cp1252 West European (Latin1) to solve the garbled Problem
When you use phpMyAdmin In the VM space to operate the database, if the MySQL Character Set displayed on the phpMyAdmin homepage is cp1252 West European (Latin1),
PHP page to UTF-8 Encoding Problems
1. Add a line at the beginning of the Code:
Copy codeThe Code is as follows: header ("Content-Type: text/html; charset = UTF-8 ");
2. php file Encoding ProblemsClick the Editor menu: "file"-> "Save as", you can
Developers often find that they do not use indexed or limit n statements, which will have a great impact on the database, for example, a large table with tens of millions of records needs to be fully scanned, or filesort is constantly performed,
Copy codeThe Code is as follows: one:
Declare @ s varchar (20)
Declare @ I varchar (20)
Set @ I =''
Set @ s = 'new members must purchase 350 yuan product'
While PATINDEX ('% [0-9] %', @ s)> 0
Begin
Set @ I = @ I + substring (@ s, PATINDEX ('% [0-9] %
In fact, this statement is not completely correct. First, the key value of query_cache in mysql is not a simple query, but a query with databasename and flag. This can be seen from the source code. I will not describe it here, but I will analyze it
1. database/table sharding
Obviously, the unlimited growth of a primary table (that is, a very important table, such as a user table) will inevitably seriously affect performance. Database sharding and table sharding are a good solution, this is
Syntax format:
EXPLAIN tbl_name
Or:
Explain select select_options
The EXPLAIN statement can be used as a synonym for DESCRIBE, or used to obtain information about the SELECT statement to be executed by MySQL.
The EXPLAIN tbl_name syntax is the same
Apache server optimization, PHP optimization, and Mysql Optimization
For program developers, the two most popular backend databases are MySQL and SQL Server. The most basic similarity between the two is data storage and query system. If you want to
BLOB is a large file. A typical BLOB is an image or sound file. due to their size, it must be processed in a special way (for example: upload, download, or store data in a database ). According to Eric Raymond, the main idea of processing BLOB is to
Of course, you can browse in PHPMYADMIN. But there are omissions after all. So I wrote a script for comparing database differences (for PHP. Of course, the code is very simple and I will not explain it. paste the Code:
Copy codeThe Code is as
1. Use MyISAM instead of InnoDB
Completely false. counterargument reason:
In the original article, MyISAM is used by default. In fact, InnoDB has become the default table engine in MySQL 5.5.x.
In addition, the simple use of InnoDB is not a
Mysql directly changes the storage path of data files to/etc/my. in cnf, modify the datadir and restart the service. However, I searched for more information from the Internet, most of which were changed to my. in cnf, datadir, sock, and startup
First of all, I suggest you navigate through the problem. The php manual is rummaged over 1001 times to solve the problem.
I am Baidu, and there are a variety of answers from netizens.
First, correct Baidu's mistake:Copy codeThe Code is as
1. Back up data on the Management node.Ndb_mgm> start backup nowaitNdb_mgm> Node 3: Backup 4 started from node 1Node 3: Backup 4 started from node 1 completedStartGCP: 43010 StopGCP: 43013# Records: 2138 # LogRecords: 0Data: 53068 bytes Log: 0 bytes
Later saw the blog Park in the use of NorthScale Memcached Server (Official Site: http://www.couchbase.com/products-and-services/memcached), it seems to share the charges, and hesitated. In fact, the requirements in the project are very simple and
Method 1Phpmyadmin is the simplest. Modify the user table of the mysql database,
But don't forget to use the PASSWORD function.
Method 2
Use mysqladmin, which is a special case stated above.
Mysqladmin-u root-p password mypasswd
After entering
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