Note: master- slave synchronization cannot replace database backupsFor example, if we mistakenly delete a table on the main database, then the corresponding operation from the database, if there is no backup, this will result in deleted data can not
1, automatic installation and deployment of MySQL, if the MySQL has been installed to determine whether the version is lower than the main library (there is a backward-compatible problem)2, get the main library backup files and binlog information
SQL statement Optimization techniques
Database backups can prevent server downtime, disk corruption, RAID card corruption, and other unexpected data loss.
MySQL Backup tool:MysqldumpIbbackupReplicationLVM Snapshotsor third party tools Xtrabacup,
Database has not been much attention, some time ago looked at the basic knowledge of MySQL, do not see do not know, a look startled, a lot of foundation are unexpectedly do not know, have been silly with some simple, stupid method, look at the
The web business needs to be sorted by actual amount of money, with three fields: price (commodity prices), pay (actual paid price), Num (quantity purchased). If the product has a discount is based on pay prices, that is, pay>0, if there is no
Today I will copy the database data to Linux run the program "MySQL in the table is read only" The problem, the query information.
Linux execute the following command
#mysqladmin-U root-p flush-tables
And there's the directory permissions problem.
The operation of the memcache is usually put inside the program to operate, add, UPDATE, delete what. If you can use MySQL to operate on memcache, that's better, the code side will be simpler. However, the use of MySQL to operate memcache, more
The advantages of MySQL replication mainly include the following 3 aspects:1. If there is a problem with the primary server, you can quickly switch to services provided from the server2. Can perform query operations from the server, reduce the
The processing method has two
1, (How to resolve the client and server-side connection (MySQL): xxx.xxx.xxx.xxx is isn't allowed to connect to this MySQL serv) Authorization Act. For example, you want to myuser use MyPassword to connect to a MySQL
But the data volume to 100,000, million to tens of millions, his performance can be so high? A little mistake, may cause the whole system rewrite, even more this system can not operate properly! Well, not so much nonsense. Use the facts to speak and
Today, using MySQL Workbench to connect to MySQL on VMware, has been unable to connect, after consulting the relevant information on the Internet, collected a number of solutions:1, Authorization law: MySQL root user by default only in the local
a.mysql the default encoding for installation is latin1, so be aware that you need to change it manually to UTF8.
b. Modify My.ini file
my.ini [MySQL] corresponds to client parameters
[Mysqld] corresponds to the database background
As the saying goes, the river can not get wet shoes, MySQL used more will also appear a lot of inexplicable problemsCan ' t open file: ' xxx. Myi ' (errno:145), this error is generally your database table file damage caused by the cause is probably
There's a plugin inside DST. The author asked me about the difference between replace into and insert into, and I said to my blog at night, I was busy at that time, now I found something from the MySQL manual, the MySQL manual says replace Into the
For most programmers, the most easily discovered and solved problem is MySQL's slow query or no indexed query, so here's how to use the official Mysqldumpslow tool to easily view this information. How to open a slow query for MySQL,MySQL Slow query
Demo data
Table structure:
The code is as follows
Copy Code
Mysql> DESC Demo; +-------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------
Backing up a database
The code is as follows
Copy Code
#mysqldump database name > Database backup Name#mysqldump-A-u user name-p password database name > database backup Name#mysqldump-D-A--add-drop-table-uroot-p
But found that Firefox always reported unterminated string literal error. Copy that piece of text to txt open found a few black box, the original is the MySQL tutorial line tag rn, in the TXT because of the use of double-byte and can not be
The condition definition and processing of stored procedures can define the problems encountered during the process of processing.
The definition of a condition
DECLARE condition_name Condition for Condition_vale
Condition_value:
Sqlstate[value]
To optimize your query, you should avoid all table scans, and you should first consider indexing the where and the columns involved.
2. The null value of the field in the WHERE clause should be avoided as far as possible, or it will cause the
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