MySQL Address: https://dev.mysql.com/downloads/repo/yum/Detect if MySQL is installedRpm-qa | grep MySQLUninstall MySQLRPM-E MySQLRPM-E--nodeps MySQLInstallationwget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpmRPM-IVH
steps to operate MySQL :1. Import MySQL Module2. Create a connection3. Creating Cursors4, perform Select/update/delete/insert and other operations (except select other operations need commit)5. Close the cursor, close the connectionImport
To export a database:1, Windows cmd Open command line2, CD to the bin directory of the installation directory of MySQL, if the bin directory is added to the environment variable does not need to switch to the bin directory3. Export database:
Mysqldump Minimum permission description required for backup:1, for table,mysqldump minimum must have SELECT permission2, if you want to produce a consistent backup, mysqldump to have lock tables permissions3, for View,mysqldump to have show view
1. Create a new SH script (you can first build a txt text and then change to SH file).The code is as follows:#!/bin/bash#set up MySQL backup directoryfolder=/**/**CD$folder Day=`Date+%y%m%d ' RM-rf$daymkdir $dayCD$day#Database ServerIp=ip
MySQL master-slave replication and read-write separation pre-test environment preparation
Linux two units
MySQL database one master one from
Start building MySQL master server installation NTP[[email protected] ~] yum install ntp
Install the MySQL service using the official Docker image1 Pull MySQL image, use netease acceleration addressDocker pull HUB.C. 163. Com/library/mysql:5.72 Renaming a mirror nameDocker tag HUB.C. 163. Com/library/mysql:5.7 mysql:5.73 Creating a
mysql> ALTER TABLE name modify column field name type;For exampleThe Address Table City field in the database is varchar (30)Modification types can be used (careful modification of types may result in errors in existing data)mysql> ALTER TABLE
MySQL is an open-source relational database management system (RDBMS) that uses the most common database management language-Structured Query Language (SQL) for database management. Let's try to think about what's most important in a production
Vim/etc/profileThe bottom#jdkjava_home=/usr/local/jdk1.8;PATH = $PATH: $JAVA _home/bin;Export Java_home PATH: WqSource/etc/profile let environment variables take effectInstall MySQL:Rpm-qa | grep mysql* See if MySQL is installedYum install MySQL
First, configure the MHA working environment192.168.2.130 Machine Operation:1.1. Create the working directory of the MHA and create the relevant configuration file(There is a sample configuration file in the directory after the package decompression)
#五. Use of Process Control#1. IF UseCreate PROCEDURE Iftest1 ()BEGINDECLARE a int DEFAULT 10;--IF (a>1 &&aIF (a>1 and aSELECT ' OK ';ELSE SELECT ' No ';END IF;END;Call Iftest ();#2. Case useCreate PROCEDURE Casetest ()BEGINDECLARE a int DEFAULT
First, the installation package download (canal.deployer-x.x.x.tar.gz official recommended to use the 1.0.22 version)Https://github.com/alibaba/canal/releasesSecond, unzip the fileTAR-ZXVF canal.deployer-1.0.22.tar.gz-c/app/canal/Iii. modification
1. In the WHERE clause, GROUP BY clause, ORDER BY clause, the column appearing on the clause;2. The smaller the index field, the better;3. The columns with large dispersion are placed in front of the federated Index, for example:SELECT * FROM
To understand grouping, you can: group the column names followed by the GROUP BY clause, and then manipulate each grouping instead of the entire table.For example: In the Product table, retrieve the quantity of goods supplied by each supplier.Mysql>
Introduction:Mysqldump is commonly used in MySQL database logical backups.Backup operation:
1. Back Up all libraries:mysqldump -uroot -pyourpass --all-databases > /tmp/all.dump
2. Back up a single library:mysqldump -uroot -pyourpass
Objective:Because there is not much time and effort, it is not possible to delve into the transactions in the database, such asHowever, some basic knowledge of the transaction, still need to be firmly mastered, to understand the basic knowledge of
Binlog Introduction:A binary log that records SQL statements that occur to or potentially change data, and is stored in a binary form on disk.function:MySQL functions like Oracle's archive logs, which can be used to view the history of a database's
I. OverviewAll MySQL column types can be indexed and are the best way to improve the performance of select queries. Depending on the storage engine, you can define the maximum number of indexes and the maximum index length for each table, and each
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