A test virtual machine installed MySQL accidentally crippled by me, now want to completely clean it off.
System environment: CENTOS7, MySQL
If the MySQL service is in the boot, you need to stop
Systemctl Stop MysqldOrService
MySQL Logic System Architecture: can be divided into connectors, connection pool, SQL interface, interpreter, optimization library, buffer, cache, engineThe MySQL logical structure is deliberately viewed as a two-tier architecture,The first layer is
MySQL has two storage engines: InnoDB and MyISAM, and the following table is a simple comparison of the two engines
MyISAM
InnoDB
The difference in composition:
Each myisam is stored as three files on disk.
There was this problem at the time of development today.Incorrect string value: ' \xe6\x97\xb7\xe5\x85\xa8 ' for column ' Sz_name ' at row 1Scene, inserting the Chinese parameter into the table in the MySQL database, throws this exceptionWhen I
Business needs, inserting data into a table in bulk, using stored procedures to insertFirst, to create a MySQL table, indicating that for Phone_number, three fields, id self-increment, number is the table to be inserted, is_used means that it is
First, the operation of the table1. View all TablesShow tables;2. Create a tableCREATE TABLE table name (field 1 type 1 constraint 1, field 2 type 2 constraint 2);3, modify the name of the tableRename table name to the new name;4. Delete a
First, create a data tableSyntax:CREATE TABLE table name (Field field type [Field Properties], Field field type [Field Properties],...) [Table options];Table options: Data table properties, typically including engine, CharSet, collateEngine: Storage
1. Now we create a new directory (if the error does not have which folder is created step-by-step)[Email protected] mysql]# mkdir/var/lib/data/mysql/2, MV or CP raw database data Catalog fileFirst look at the current data file size:Du-h--max-depth=1
MySQL Incremental backup and recovery
Incremental backup: Only those files that were modified after the last full or incremental backup are backed up.
Advantages: No duplication of data, backup volume is small, time is short.
Modifying the MY.CNF configuration file/usr/local/mysql/bin/mysql--verbose--help | Grep-a 1 ' Default options 'Default options is read from the following files in the given order:/ETC/MY.CNF/ETC/MYSQL/MY.CNF/USR/LOCAL/MYSQL/ETC/MY.CNF
Today using the IDE connection line under MySQL error can not connect to MySQL server. Too many connections, the error is clear, the connection with MySQL is full. Also, each service creates a MySQL connection pool, which takes up a lot of long
There are several times in MySQL: Date, time, DateTime, timestamp, yearMySQL data type meaningDate only stored date, ' 2018-07-12 'Time is stored only seconds and minutes, ' 09:51:02 'DateTime storage Month day minute minute, ' 2018-07-12 09:51:02
A trigger is a database object that is related to a table, and a trigger can only be a permanent table created and not a temporary table.1.1 Creating a Trigger-- Syntax: CREATE TRIGGER trigger_name trigger_time trigger_event on for Each ROW
MySQL group replication implements a multi-master update based on the replication protocol (single master mode).A replication group consists of multiple server members, and each server member in the group can perform transactions independently.
Environment preparation
Mysql-8.0.11-winx64.zip:https://cdn.mysql.com//downloads/mysql-8.0/mysql-8.0.11-winx64.zipInstallation environment: Windows7.
Extract
Unzip the Mysql-8.0.11-winx64.zip installation package to any directory (
1, VirtualBox to Ubuntu system settings, "Network" select "Bridge network card"2. Install MySQL serversudo su; Apt-get Intall Mysql-server3. Grant permission to remote access:Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 '
First, the database operation:1. View the database:>show DATABASES;2. Create a database:>create DATABASE db_name; Db_name for Database name3. Use the database:>use db_name;4. Delete the database:>drop DATABASE db_name;Second, create the table:1.
I. Database additions and deletions1. Create a new databaseCREATE database name CharSet UTF8;Database name rule: can be by letter, number, underscore, @, #, $ case-sensitive, cannot use keywords such as create SELECT, cannot use numbers alone,
The + + PRIMARY key (primary key) uniquely identifies a row in the table for a property or attribute group + +. = = A table can have only one primary key = =, but may have multiple candidate indexes. = = Primary key can guarantee record unique = =
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