Index is the key to quick search. The establishment of MySQL indexes is very important for the efficient operation of MySQL. The following describes several common MySQL index types.
Index fields in database tables can greatly improve the query
In many cases, you can export and download database files locally or from a website. After downloading to a local database, you can only restore the mysql database by importing the database. Using UE or other editors to view SQL statements is
I can find all the RedHat systems on the Internet. I have not introduced any articles about the MySQL cluster of the Ubuntu system. Now I am writing the MySQL cluster method of Ubuntu. Don't scold me for being a newbie.
Introduction to the network
The following articles mainly introduce the analysis of MySQL hidden space problems, we all know that the main function of the TMPDIR value of the environment variable used by the MySQL database is to save the actual path name of the Directory
For example, if there is a post reply table, posts (id, tid, subject, message, dateline ),Id is the auto-increment field, tid is the id (foreign key Association) of the reply topic post, subject is the reply title, message is the reply content,
To use the background management program of the MySql server, the program must run because the client accesses the database by connecting to the server. Next let's optimize our MySql database service based on the system variables and status
MySQL batch replacement is a feature that we often use. Sometimes, when the site contains sensitive words, it will cause us trouble. However, when the amount of information is large, it is unrealistic to search and modify an article.It is easy to
Mysql backup method 1. mysqldumpLow Efficiency, slow backup and restoration, and any data insertion and update operations will be suspended 2. mysqlhotcopyMysqlhotcopy is used to back up the myisam data table. During the backup process, any data
Vertical partitions and horizontal partitions in database extensions are not a concept of MySQL partitions.Vertical and horizontal partitions distribute data that is supposed to be stored in the same database to databases on multiple hosts through
Modify Database Name of mysql replication
-- Replicate-rewrite-db = from_name-> to_name
Command-Line Format -- replicate-rewrite-db = old_name-> new_nameOption-File Format replicate-rewrite-dbPermitted ValuesType string
Tells the slave to translate
Clean up the duplicate data of Statistic every day [that is, the Date Server Item SubItem is identical, the Id must be different, and the Value may be the same]
Let's take a look at the Statistic table structure.
Processing
Optimization of MySQL group by operationsBY default, MySQL performs the group by col1, col2.... operation according to the order of the group by field. If an order by clause containing the same columns is explicitly included, the actual execution
1. query_cache_sizeAfter the select statement is used to query mysql, the query structure is cached as SQL text. When the same SQL statement is used to query again, data is directly retrieved from the cache and returned.The value of
I encountered a small problem when installing mysql today, as shown in the figure below.
After reading it, it should be during compilation that an error is reported because the library file ncurses and termcap is missing.If you know the problem,
On a MySQL server with heavy load, you may occasionally see connection timeout errors, such as: Can't connect to MySQL server on 'mydb' (110 ). If you have multiple connection requests at the time, you will find other connections are okay. This type
I. Common commandsCreate database nameSelect Database: use databasenameDirectly Delete the database. Don't remind me: drop database nameDisplay table: show tablesTable Description: describe tablenameRemove duplicate fields: Add distinct to
These two statements are usually used to maintain the mysql database. 1. view the size of each database in mysql SELECT sum (DATA_LENGTH) + sum (INDEX_LENGTH) FROM information_schema.tables where TABLE_SCHEMA = 'database _ name ';The result is in
CUSTOMER NAMECustomers in Ningbo, Zhejiang Province. Data TypeMYSQL databaseSmall Data size1.1 GBFault symptomAll tables in the Gamedb2 database are dropped.Customer demandRestore all data.Fault Detection TestHacker attack!ResultAs the data of a
Today, I wrote a slightly more complex stored procedure and shared it with two easy-to-ignore points. If there are packages that happen to encounter the same problem, you can spend less time figuring out the technical content of wood... 1. Example
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.