Hands-on teaching you to implement a backup restore of MySQL
Sample code with my familiar PHP, of course, you read and understand the ideas, I believe you can quickly use your familiar language to write out.
First, create a new Dbbackup class and
The examples in this article describe how MySQL views, creates, and deletes indexes. Share to everyone for your reference. Specifically as follows:
1. Indexing effect
On the index column, in addition to the ordered lookup mentioned above, the
Difference
Char is similar to the varchar type, but they are saved and retrieved in different ways. Char has a fixed length, and varchar belongs to a variable-length character type. Their maximum length and whether trailing spaces are retained are
These days to toss MySQL server, so on the internet to collect some maintenance strategies, and then summarize their own experiments, the following is my experience and some of the suggestions of others.
Log type:
MySQL has several different log
If you are using a database that suddenly appears to be a class problem
Under Linux to execute the following command on it, of course you have to find your MySQL directory
In Linux
Copy Code code as follows:
Review Mysql/innodb's history of improvement. You can easily find out. In the MySQL 5.6 stable version has never been so fast in read-only, it is easy to understand, as well as in Read-only (RO) has a good expansion. It is also expected to reach a
Background
We use MySQL to store all the data for FriendFeed. The database has grown a lot as the user base grows. There are now more than 250 million records stored with a bunch of other data covering from comments and "like" to the buddy list.
MySQL provides different storage engines for different functional requirements. The so-called storage engine is the specific implementation of the specific interface under MySQL.
Federated is one of the implementations specifically for remote
root@db-02 ~]# mysql-u Root-bash:mysql:command not found
Reason: This is because the system by default will look for commands under/usr/bin, if this command is not in this directory, of course, will not find the command, we need to do is map a link
MySQL 5.6 will automatically hide the password information in the log. This is not just confusing, then the one-way hash value is stored in the log file. You can disable the password-hiding feature of the log file by setting Log-raw=off. Log-raw
Generally use the level two index to count:For example: ID is PK aid is secondary index
Using
Copy Code code as follows:
Select COUNT (*) from table where ID >=0;
Or
Select COUNT (*) from table;
The effect is the same, are the
In our web application, although PHP, JSP and other scripts have provided the MySQL interface, but obviously directly using C language has better security and performance, in this article can be reflected.
First look at the structural body:The
First, introduce the type of index
MySQL Common indexes are: Primary key index, unique index, normal index, FULL-TEXT index, combined indexPRIMARY key (primary key index) ALTER TABLE ' table_name ' Add PRIMARY key (' column ') unique (unique index)
The general process of fault detection and correction for a table is as follows:
Check for errors in the table. If the table checks through, complete the task, or you must fix the database table that is wrong.
Copy the table files before starting
First show you the Message board effect chart:
Recently looked at the basic PHP syntax, I want to use these basic things to realize the message board, but also a consolidation of basic knowledge.
What is a message board? A carrier that can be
Create a custom functionIn the process of using MySQL, MySQL's own functions may not be able to complete our business requirements, then the need for custom functions, such as the author in the development process encountered the following
set,enum data types are object of string type, where the set can contain up to 64 elements and can be arbitrarily taken to the elements in the collection. An enum is an element that can only be taken to a wood in a collection, containing up to 65,536
It is easy to discard existing MySQL tables. However, you need to be very careful that deleting any of the existing tables will not recover because of data loss.Syntax:
The following is a generic SQL syntax discard (delete) MySQL table:
According to the official manual recommended InnoDB buffer Hit ratios calculation is:
100-((ireads/ireadrequests) *100)
ireads:mysql->status->innodb_buffer_pool_reads
iReadRequests: Mysql->status->innodb_buffer_pool_read_requests
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