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
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.
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
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
To connect asp to a mysql database, you need to install the MySQL ODBC 3.51 driver http://www.jb51.net/softs/19910.html.
Let's take a look at the following code.
Copy codeThe Code is as follows: set conn = server. createobject ("adodb. connection ")
Unsigned is a non-negative number. You can use this type to increase the data length!
For example, if the maximum value of tinyint is 127, the maximum value of tinyint unsigned is 127*2.
The unsigned attribute is only for integer type, while the
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] %
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
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
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
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
System: Ubuntu 10.10Mysql source file: mysql-5.5.8.tar.gzInstall required tools: cmake, GNU make, gcc, Perl, libncurses5-dev, bison (optional), chkconfigNote:1. There are several bugs in the official source code from, which were manually modified by
Basic Concepts
Definition:
The binary log contains all statements that update data or have potentially updated data (for example, no DELETE matching any row.
Purpose:1. The main purpose of the binary log is to restore the database so that the
Previous articles on this site introduced how to implement the microblog: PHP + Mysql + jQuery to implement the microblog Program-jQuery. This example is based on its database structure, displays the presentation information dynamically.
View
Copy codeThe Code is as follows: class mysql
{
Private $ db; // datebase connect
Private $ result; // mysql result
Static private $ mysql; // mysql object
Private function _ construct ()
{// The work before Create an object
$ This-> db =
2.1 log on to the mysql console [the user name is root, and the password is blank by default]
Switch to the mysql bin directory cd d:/wamp/mysql/bin
Log on to the mysql Console
Syntax: mysql-h hostname-u username-p
Connect to another host
Code:
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.