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
First, the concept:① Database Synchronization (master-slave Synchronous---Primary database writes to write data from server)② database Synchronization (primary primary Sync---Two database servers write data to each other)
Second, for examplePrimary
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
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
Local Environment: Windows XP system, XAMPP integrated environment.
XAMPP installation directory: D:/XAMPP
1, first stop the running MySQL process
Copy Code code as follows:
>net stop MySQL
If it is not loaded as a service,
To modify the MySQL password:
Copy Code code as follows:
Mysqladmin-u root-p Password 123456
Mysqladmin-u username-p Old password password new password
Forget MySQL password:
Copy Code code as follows:
Chown-r
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
Front-End time with a DB-related project, Alanc feedback has a query that uses indexes that are many times slower than not using indexes, a bit of a ruin. So follow up, with explain, look at 2 different results of the query.
Without indexing the
We usually have to count the number of connections in the database to refer to the total number of statistics, not subdivided into each IP. Now to monitor the number of connections per IP, the implementation is as follows:
Method One:
Copy
MySQL Master Sync configuration
Server name
Ip
System
Mysql
Odd.example.com
192.168.1.116
rhel-5.8
5.5.16
Even.example.com
192.168.1.115
rhel-5.8
5.5.16
Suppose the
The following issues occurred today when you started MySQL:
[Root@www ~]# mysql-u root-p
Enter Password:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (usin G Password:yes)
Online answers are various, the final
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
MySQL Import SQL script error: 2006-mysql server has gone away
To some small script that rarely complains, but recently imported a 10+m SQL script, but repeated the error:
Error occured at:2014-03-24 11:42:24 line
no.:85
Error
Issues to be considered in implementing a MySQL database encapsulation
1. Ease of Use
The direct SQL statement is used to operate the method. As long as you write SQL statements, there will be no other learning costs.
The uctphp Framework
Write it down before you can find it again!
When PHP operates the database, the data in the database uses UTF8 encoding, and when it is read out, it shows all the??????? The question mark garbled, looked for some data originally is before reads
Three information on MySQL:
Information about the results of the query: This includes the number of records produced by any select,update or DELETE statement.
Table and Database information: This includes information about the structure of
Once you have a connection to the MySQL server, you need to select a specific database job. This is because the MySQL server may have more than one database.from the command prompt, select the MySQL database:
It is very simple to select a specific
I guess everyone in the command line operation MySQL will be very worried about the operation of the database now, at least I have struggled, you may say that I do not know the command, yes this is indeed possible.But today we are introducing a good
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