The following information is required to create a MySQL data table:
Table name
table field Name
Define each table field
GrammarThe following is the general SQL syntax for creating MySQL data tables:CREATE TABLE table_name
Master-slave replication: Single virtual machine enables multi-instance 3306,3307,33083306 Main Library---> 3307 from library3308 from Library1. Start MySQL multi-instance service 3306,3307,3308/data/3306/mysql start;/data/3307/mysql start;/data/3308
Download imageUsing the docker pull mysql:5.7.21 pull MySQL image, use docker images the view-owned image after the download is successful:
?
Downloaded MySQL image.
Create a new folder for persistence1. Create a
MysqlMySQL is a relational database management system, is an open source software. With PHP and Apache can be better performance, but also can work on many platforms . Orcale is a database that creates multiple users, and MySQL is a user who creates
Log is very important to a system or application, troubleshooting or resolving faults, the first time is to look at the error logMySQL Log classification: Log files record the various types of activities affecting the database, MySQL database common
Mid-year Office relocation, new server, test environment needs to be re-built, the following is the installation of the MySQL service process, recording some of the problems, now organized as follows:1. First download the MySQL installation package,
1. Install MySQL:Use the following three commands to install the appropriate software:$sudoapt-get install mysql-server$sudoapt-get install mysql-client$sudoapt-get install libmysqlclient-devIn the process of executing the first command, you need to
1. database table name naming specification The use of 26 letters (case-sensitive) and 0-9 of the natural number (often do not need) with an underscore ' _ ' composition; The name is concise and clear, and multiple words are separated
1. View in NavicateShow variables like ' char% ';Show variables like ' collation_% ';2. View in MySQLThe differences between the two can be found by contrast, so the data in MySQL and navicate are set separately by setSet
Develop a daemon script that monitors MySQL master-slave replication anomalies (including unsynchronized and delayed) every 30 seconds#!/bin/bashfile=/root/mysql.txt #mysql > Show slave status\g; This command can view status information and save it
Today is the 27, tomorrow is 28, one to the Chinese New Year, it is customary to say the lunar calendar, not to say the Gregorian calendar. These two days are very busy, and then a remake.The Linux processing Text tool has three Musketeers, awk,
When querying a GROUP BY statement com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:Expression #2 of SELECT list is not in GROUP by Clause and contains nonaggregated column ' Col_user_6.a.start_time ' which is not functionally dependent on
This problem is due to the fact that the database table is not installed in the data directoryWorkaround:Vi/etc/my.cnfModify the correct datadir= "xxxxx" toThen service mysqld startService MySQL StartAfter normal startup, you will/var/lib/mysql the
Basic mysql operations: Create, view, modify, and delete Databases
Related to this section:
Create databases, view databases, modify databases, and delete Databases
Start Time:Create a database: Syntax:
Create database name [database options];
Mysql 5.7.21 unzip the package to install Navicat database operation tool, 5.7.21navicat
Install the MySQL decompress version and Navicat database operating tool as follows:
1. Download MySQL
1. You can download the MySQL version.
2. decompress the
When MySQL uses indexes and when it does not use indexes.
Index:
You can use indexes to quickly access specific information in database tables. An index is a structure that sorts the values of one or more columns in a database table, for example,
MySQL common functions
Aggregate functions
Count () queries the number of rows of a fieldMax () queries the maximum value of a fieldMin () queries the minimum value of a fieldSum () queries the sum of a fieldAvg () queries the average value of a
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