How to use crontab to regularly back up MySQL database under Linux:First step: Configure the backup directory code on the server:Mkdir/var/lib/mysqlbackupCd/var/lib/mysqlbackupStep Two: Write the backup script code:VI dbbackup.shPaste the following
BackgroundA business database load alarm Abnormal, CPU usr reached 30-40, high. Use the tool to view the SQL that the database is executing, most of the preceding:
SELECT ID, cu_id, name, info, Biz_type, gmt_create, Gmt_modified,start_time,
1. Cause analysisMySQL server is installed on the server. After the service is started, the Mysql-u user name-p password can be connected normally, but not on the other machines.There are two possible reasons for this problem:
After MySQL
1. Install Ubuntu1 under VM) Download image ubuntu-15.04-desktop-amd64.isohttp://yunpan.cn/cf5dwv6zw33ef access password ECBA (personal share on 360 network disk) 2) After installation is complete, The first problem is Chinese conversion--language
MySQL field typeMySQL supported data types--string typesNumber Type
Column type
The amount of storage needed
Scope, remarks
TINYINT
1 bytes
一个很小的整数The signed range is 128 to 127, the unsigned range is 0
A. Data table structure for storing pictures:The structure of the----table ' image '--create table IF not EXISTS ' image ' ( ' id ' int (3) is not NULL auto_increment, ' name ' varchar () C Haracter set UTF8 NOT null, ' pic ' blob is not null, '
netstat -an | grep time_wait | WCLog in to the Web server (Linux):Netstat-ae |grep MySQLBy adjusting the kernel parameters to resolve,vi /etc/sysctl. confEdit the file and add the following:net.ipv4.tcp_syncookies = 1net.ipv4.tcp_tw_reuse = 1net.ipv4
Import and export MySQL database commands under LinuxFirst, export the database with the mysqldump command (note the installation path of MySQL, which is the path to this command):1. Export Data and table structure:Mysqldump-u User name-p password
Job required to change all the MySQL table engines to InnoDBExecute the following SQLSET @DATABASE_NAME = ' name_of_your_db ';SELECT CONCAT (' ALTER TABLE ', table_name, ' engine=innodb; ') As Sql_statementsFrom Information_schema.tables as TBWHERE
Using MySQL connection in vs2013 entityframework often encounters this problem: your project references the latest Entity Framework, but the version-compatible Entity Framework Data provider required for the data connection cannot be found. Exit
Turn from: http://ctripmysqldba.iteye.com/blog/1938150 (modified)When MySQL is doing DDL operations such as ALTER TABLE, there are times when waiting for table metadata lock is waiting for the scene. Furthermore, once ALTER TABLE TableA's operation
Several ways to determine if MySQL is normal#################################Method 1: Look at the portNetstat-lntup|grep 3306|wc-lLsof-i: 3306 |wc-lRemote:/telnet/nc/nmap#################################Method 2: See the processPs-ef |grep
Overview?? Backup is the basis of disaster recovery, which is the process of copying all or part of the data collection from the application host's hard disk or array to other storage media to prevent the system from operating errors or system
=============Welcome reprint, please indicate the sourceLi Hui (DBA)Date: 20151008=============1 Installing Percona ToolkitGo to official website to download2. Installing Anemometer: Https://github.com/box/Anemometer3. Download PHP related
MySQL Database multiple optimization scheme1. Hardware optimization ( physical Machine )A,CPU 8~16 CPU , b,mem 96g~128g, three-and- four examples. 32~64g Memory,2 instancesC,the more disk number the better , performance:SSD ( high concurrency ) >
First, open the slow query log1. Query slow query time default 10 seconds like "Long_query_time"2. Query slow query log file address like "%slow%"3. If the slow query log is not turned on, configure the item under My.ini [MYSQLD] and restart the
the following three common MySQL backup scenarios are available:Mysqldump + BinlogLVM + BinlogXtrabackupThis example is convenient to demonstrate that the data inside the database is empty. Let's get started.mkdir /opt/backup
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