First, when setting the Date field of the database, you must first determine what type to use, DATETIME, TIMESTAMP, date, time, year.where datetime and time are used more, and the date type of the Pojo generated in Java is dated.Key conversion steps:
First, MySQL Create data table1. Create a MySQL database from the MySQL command window2. Create MySQL data table from MySQL command window3. View the details of the created data table through the MySQL command windowSecond, MySQL delete data sheet1.
Initiating a request from the database to the primary databasePrimary database validation request, if authentication is passed, turn on I/O threadSending bits files from a database to the primary databaseThe primary database matches the value of the
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
1, first confirm the error Binlog and last event.2, then go to the main machine to see the error content and the location of the error, if the end of the error, you can directly from the new Binlog synchronization.#/mysql/logs#.
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)
##==============================================================##MHA (Master high availability) is a MySQL highly available solution developed by the Japanese Dena Company, which is used to quickly switch between failover and master-slave promotion,
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
1. Download the appropriate version of the website https://dev.mysql.com/downloads/mysql/5.6.html#downloads2. Extracting filestar -zxvf mysql-5.6. -LINUX-GLIBC2. A3. Copy the extracted MySQL files to the system local software directoryCP mysql-5.6.
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
1. Table name case sensitive, Linux down to MySQL:
Database name and table name are strictly case-sensitive;
Table aliases are strictly case-sensitive;
The alias of the column name and column is ignored in all cases;
Variable names
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.