Example: http://www.sina.com,http://www.baidu.comThe first 10 characters are the same, indexing starts with the 11th character and is a waste of resources. Here are two tips to solve this problem:1. ReverseSort data in reverse order:
The following error occurs when inserting Chinese in the operations database:ERROR 1366 (HY000): Incorrect string value: ' \xc4\xe3\xba\xc3 ' for column ' username ' at row 1Solution:View the encoding settings for the current database in cmd: Server,
Find records for all repeating headings:[SQL]View PlainCopy
SELECT * from t_info a where ((SELECT COUNT (*) from t_info where Title = A.title) > 1) Orde R by Title DESC
First, find duplicate records 1, find all duplicate
Displays the total population and area of each region. Only those areas with more than 1000000 area are shown.SELECT Region, sum (population), sum (area) from Bbcgroup by regionhaving SUM (area)>1000000Here, we cannot use where to filter more than 10
mysql-Learning -10-20170605-Replication MonitoringThe timestamp record in evevnt performed by Sql_thread is T1The timestamp value in the event Io_thread gets is: T2T2>t1Units are: secondsMaster-slave delay, theoretically in 50MS
Today, a colleague said that his MySQL database does not come, very depressed, the error is as follows#/etc/init.d/mysql StartStarting MySQL .... error! The server quit without updating PID file (/data/mysql/mysql3306/data/mysql.pid).The first time
First, go to the official website to download the MySQL version number required for this installation. We need to install the 5.1 version number and the CentOS system is 64-bit. The following is the
1. When using the INSERT statement, if there is no data in the original table, then the newly inserted data is new for the table after inserting the data:2. When a DELETE statement is used, the deleted data is OD, relative to the data in the table
1. Change the table method.It may be that your account is not allowed to log on remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from
One, database operationsPrimary keyThe primary key is one of the indexes and is a unique index and must be defined as primary key. A table has only one primary key, and the primary key can consist of multiple columns.The keyword that declares the
1 load MySQL driver:Class.forName ("Con.mysql.jdbc.Driver"). newinstance ();2 database connection According to the database path URL, account number, password:Connection con=drivermanager.getconnection (URL, "root", "s123");3 Creating the
1. Data Entry integrity: Create a data table to add constraints to it: Classification: entity integrity, domain integrity, referential integrity entity: A row in a table ( one record ) represents an entity ( Entity )The role of entity integrity:
To get the intersection of two collections in MySQL, my method is as follows:1. Two sets of the structure to be consistent, the corresponding number of fields, field type2. Combine two sets with the UNION all keyword, where the result is a duplicate
View each PHP-FPM average occupancy system memory, but also for looking at nginx/mysqld and so on, the PHP-FPM replaced MysqldPS--no-headers-o "Rss,cmd"-C php-fpm | awk ' {sum+=$1} END {printf ("%d%s\n", sum/nr/1024, "M")} 'Viewing memory
Mysqldump parameter -- lock-tables analysis, mysqldumpskiplock
Mysqldump has a parameter -- lock-tables, which has never been described in detail until a user asks"Does the lock-tables parameter lock all tables in the current database at one time or
Automatic Generation of SQL for database data comparison and Automatic Generation of SQL for comparison1. Background
One iteration is coming to an end and is submitted to the user for testing. The system administrator starts some data in the test
Description of Innodb status and Innodb status
Innodb_buffer_pool_pages_dataThe number of pages in the Innodb buffer pool containing data, including dirty pages. The Unit is page.Innodb_buffer_pool_pages_dirtyThe number of dirty pages in
Basic MySQL content
Create a databaseTable operations must first be written into the use Database Name;-- Create a database named inana_db and specify the database character encoding as utf8.Create database inana_db character set utf8;Drop database
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