When using MySQL databases, data is often lost due to operation errors. MySQL database backup can help us avoid data loss or other database problems caused by various reasons.
I. Data Backup shortcuts
Because this method has not been verified in the
Abstract: Date and time functions are very useful for creating a site. The website owner is often interested in when data in a table is updated. Using Date and Time Functions, you can track changes to a table in seconds.
Date and time functions are
The most basic is mysql's mysqlslowdump
Easy to use:
Mysqldumpslow-s c-t 20 host-slow.log
Parameters:
1.-s, sorting, c, t, l, r, and ac, at, al, and ar are sorted by query times, time, lock time, and returned records respectively. Adding a is
If you are running a Web application that uses MySQL, it can store passwords or other sensitive information in the application. Protecting this data from access by hackers or prophers is an important concern, because you cannot allow unauthorized
Tmp_table_size
If the temporary table in the memory exceeds this value, MySQL automatically converts it to the MyISAM table on the hard disk. If you execute many advanced group by queries with a large amount of memory, you can increase the value of
As a MySQL administrator, a common goal is to ensure that the server is running as much as possible so that the client can access it at any time. However, it is best to disable the server sometimes (for example, if the database is being relocated,
Mysqld regular MySQL ServerMysqld-opt optimizes the mysql server and provides some functions to mine better functions.Mysqld-max is the same as mysqld, But it supports update and more experimental functions (more unstable)
++ Install mysqlSee the
1. Automatically increasing data type Processing
MYSQL has a data type that increases automatically. When you insert a record, you do not need to operate on this field. The data value is automatically obtained. ORACLE does not have an
Mysql5.2.20 start service and apply security settings error solution: 1. uninstall MySQL. 2. type regedit in "run" to enter the registry. 3. Delete the HEKY_LOCAL_MACHINE \ SOFTWARE \ MYSQL directory 4. Delete the HKEY_LOCAL_MACHINE \ SYSTEM \
Log files first recognized by mysql 1. the err log error log records all serious warnings and error messages during mysql running, as well as detailed information about each mysql server startup and shutdown. By default, the error log function is
MySQL obtains the system performance and status.
#! /Bin/ksh INTERVAL = 5 PREFIX = $ INTERVAL-sec-status touch/tmp/running RUNFILE =/tmp/running my-e 'show global variables '> mysql-variables while test-e $ RUNFILE; do file = $ (date + % F _ % I)
In Mysql, what is the difference between int (10) and int (11)? First, let's talk about the mysql value type. MySQL supports all standard SQL value data types. These types include strict NUMERIC data types (INTEGER, SMALLINT, DECIMAL, and NUMERIC),
[SQL] MySQL performance optimization 1. Optimize the query cache. Most MySQL servers have enabled the query cache. This is one of the most effective ways to improve performance, and it is processed by the MySQL database engine. When many identical
The SELECT statement containing group by in MySQL displays the result of 0 in COUNT ().
Mysql> select * from t1; + ------- + ------ + | level | name | + ------- + ------ + | 1 | a | 1 | B | 1 | c | 2 | a | 2 | B | | 4 | a | 5 | B | + ------- + -----
In MYSQL, take the first day of the current year and the current week, month, the first day of the quarter/the last day of mysql to obtain the format of the first day of the year, month, and day:
SELECT DATE_SUB(CURDATE(),INTERVAL dayofyear(now())-1
Mysql-libs and MySQL-server conflict resolution install php-mysql Yum install php-mysql appears from install of mysql-libs-5.1.69-1.el6_4.x86_64 conflicts with file from package MySQL-server-5.6.13-1.linux_glibc2.5.x86_64 since the server is
MYSQL binary solves the case sensitivity problem of mysql Data. BINARY is not a function and is a type conversion operator. It is used to force the string following it to be a binary string, it can be understood that string comparison is case
Mysql-5.6 master-slave replication and encountered errors mysql replication process: each write operation, it will save a copy to its own database, at the same time, this write operation will also be stored in a binary log file and saved as events.
To create, authorize, delete, and modify a mysql user's password, you must first declare that, in general, you must have the root permission in MySQL to modify the mysql password and authorize it. Note: This operation is performed at the WIN command
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