MySQL Master-slave Replication (CentOS) 1. Install MySQL 1.1 installation1.2 Starting the MySQL service1.3 Changing the root password1.4 Modifying a logged-on userPrecautionsRefresh Permissions2. Master-Slave Replication 2.1 Modify the configuration
Login:Mysql-h server address-u login name-P Port-p password(It is best to login without entering the password, wait for the next prompt to come out and then lose, so you can hide the password in the interface)Exit:Quit or exitNote: After logging
Download mysql-community-5.7.18-1.el6.src.rpm# RPM-IVH mysql-community-5.7.18-1.el6.src.rpmThe Rpmbuild folder will be installed in the sibling directoryGo to sources directory, unzip mysql-5.7.18.tar.gz# CD mysql-5.7.18# mkdir Debug && CD Debug#
1 Data type (column type)
The so-called data types: a unified classification of data, from a system point of view is to be able to use a unified approach to management, better use of limited space.
The data types in SQL are divided into
Official website: https://dev.mysql.com/downloads/mysql/1, the download Mysql-5.6.36-win32.zip decompression to the need to install the location, such as: d:\;2. Configure WINDOWS environment variable settingsSystem variables, environment variables,
Large-scale multi-threaded operation of the transaction, sometimes open a link, will wait, this time if the database time-out setting is too short, it may appear, the data link is automatically released, of course, set too large is not good, slow
Find out the salary increases for all employees since they entered the job, give the employee number Emp_noy and their corresponding salary increase growth, and follow the growth in ascending orderCREATE TABLE ' Employees ' (' Emp_no ' int (one) is
Installation of 1.mysqlInstallation of MySQL under Windows:Run the Mysql-installer-community.msi file for installationTo install the voucher Agreement select agree, Next:There are 5 types, namely developer, server, client, full, custom; Choose
First, what is Innodb_buffer_pool:Innodb_buffer_pool is a memory area, InnoDB uses it to cache data, index, Undo,change buffer ... ;The area is divided into several parts, each called a innodb_buffer_pool_instance. For every instance,From the data
SQL statement optimization and indexing1.Innerjoin and left connection, right connection, sub queryA. Inner joins are also called equivalent connections, left/rightjoin are outer joins.SELECT A.id,a.name,b.id,b.name from A left JOIN B on a.id
MySQL Select field data typeMySQL supports a number of data types, and choosing the right data type is critical to getting high performance. There is a simple principle in choosing to help make better choices.The simple principle:A, usually the
CREATE DATABASE School; Building a library schoolUse School; Open Library SchoolCREATE TABLE Teacher (//Build tables TeacherID int (3) auto_increment NOT NULL primary key,name Char (TEN) is not NULL,address varchar,Year date); End of Build
The run mode of the SQL statement:(1) Interactive mode(2) Script mode#1. To set the encoding format for an SQL statementSET NAMES UTF8;#2. Delete Database DangdangDROP DATABASE IF EXISTS Dangdang;#3. Create a database Dangdang, specifying the
MySQL (III), mysql1 field attribute
Primary keys, unique keys, and auto-increment.
1.1 primary key
Primary key: primary key. Only one field in a table can use the corresponding key, which uniquely restricts the data in the field and cannot be
MySQL database-Date and Time Functions, mysql database functions
I. Date and Time Functions
Concept of a function: An operation unit that inputs parameters in a specified format and returns the correct result.
1. Return Current date: curdate
MySQL (2), mysql1. Data Type (column type)
The so-called data type: Unified Data Classification, from the perspective of the system is to be able to use a unified approach for management, better use of limited space.
SQL divides data types into
MySQL database-Summary and grouping data, mysql database
I. Summary and grouping data
Query statement ---> result set (multiple data records) ---> aggregate function ----> Single Row record
1. Common Aggregate functions:
Sum () calculates the sum of
MySQL database-subquery, joint query, mysql database
I. subqueries using the IN keyword
1. query the score information of a game whose game type is 'Card and card type '.
The game score table does not contain game type information.
Idea 1: Use link
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