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),
Through previous operations on mysql, I first excluded mysql configuration issues and checked whether msyql is running normally. By checking the *. errfile In the mysql data DIRECTORY (change the extension name to .txt), I can check it in notepad.
I am using a MYSQL database operated by MySQLdb. Let's take a simple example:
Copy codeThe Code is as follows: import MySQLdb
Try:Conn = MySQLdb. connect (host = 'localhost', user = 'root', passwd = 'root', db = 'test', port = 3306)Cur = conn.
Mind Map
Click an image to view the large image.
IntroductionSituation: If your table structure is poorly designed or your index design is poor, please optimize your table structure design and assign appropriate indexes so that your query
I. Purpose: To synchronize the MySql database on the master server to the slave server, so that operations on the master server can be instantly updated to the slave server, this prevents the primary server from being unable to be used due to an
1. Calculate the number of years
You figured out how old this person is on your birthday.
Copy codeThe Code is as follows: SELECT DATE_FORMAT (FROM_DAYS (TO_DAYS (now ()-TO_DAYS (@ dateofbirth), '% y') + 0;
2. Difference between two time points
You have to worry about using Vps, and backup is also required. Backup services in Linode are charged, with a monthly fee of $5. Instead of spending the $5, it's better to get yourself full of clothing and food. The Dropbox is installed for the
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
Locking also reduces the overall time for multi-connection testing, although the maximum wait time for them to wait for locking will increase. For example:
Copy codeThe Code is as follows: Connection 1 does 1000 inserts
Connections 2, 3, and 4 do 1
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
MySQL has been installed on the two servers, which are all packaged in rpm and can be used properly.
To avoid unnecessary troubles, the MySQL versions of the master and slave servers should be consistent as much as possible;
Environment: 192.168.0.1
Copy codeThe Code is as follows: delimiter |
Drop function if exists IS_MOBILE |Create function IS_MOBILE (x VARCHAR (255) returns tinyint (1)BEGINDECLARE result TINYINT (1) DEFAULT 0;SET x = LCASE (x );If right (x, 4) = '.mp4 'THENSET result = 1;
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
Since the website system was launched, the data volume reaches 500 mb, nearly records. Database Operations are basically slow, and users will feel angry ~~ Then I posted this situation in the group, including the machine configuration and so on.
Introduction
MySQL is one of the most popular free open source programs in history. It is the backbone of the database for thousands of websites, and can use it (and Linux) as a powerful proof of exponential growth of the Internet over the past 10
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
The following code is often used in php to obtain the SQL query statement for determining the date.
Copy codeThe Code is as follows: $ now = time (); // get the current date
$ SQL = "select * from 'team' where end_time> $ now ORDER BY sort_order
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
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