First, you should exclude the version issue:One version of the problem. I've been installing a lot of useless stuff for half a day, and now I'm going to start smoothing my mind.1. Problems encountered:
MySQL has created the completion table in caseCauses the Time field to update the event automatically each time the data is uodate,Run the following SQLALTER TABLE tab_name COLUMNTIMESTAMPnotNULLDEFAULT Current_timestamp on UPDATE
advanced operations for DatabasesMySQL provides a mysqldump command that enables backup of dataBackup of Data1. Backing up a single databaseMysqldump-uusername-ppassword dbname [tbname1 [tbname2 ...] >filename.sql2. Backing up multiple
adding, updating, and deleting dataAdd DataAdd data to all fields in a tableINSERT into table name (field name 1, field Name 2, ...)Values (value 1, value 2, ...);Insert into table name values (value 1, value 2 ...);Add data to a specified field in
transactions and stored proceduresTransaction ManagementThe concept of a transactionA transaction is a set of operations against a database, which can consist of one or more SQL statements, and the operation of the same transaction has the
1. Creating database: Create database name;Delete the database: drop database name;View database encoding: Show CREATE database name;Modify database default encoding: ALTER database name default CHARACTER SET character encoding name [COLLATE
The parameter Innodb_fast_shutdown controls the InnoDB shutdown mode with three values:0: InnoDB performs slow shutdown, completes a full purge and change before closing Buffer Perge and flushes all dirty pages back to disk. It may take a few
1. Create a new user1.1 Log in to MySQL:@>mysql-u root-p@> Password1.2 Create User:Mysql>CREATE USER ‘admin‘@‘localhost‘ IDENTIFIED BY ‘admin‘;This creates a user named: Test with a password of: 1234.Note: "localhost" here means that the user can
DBAs familiar with SQL Server know that in SQL Server, if you want to display self-increment, you need to use SET IDENTITY_INSERT tb_name on to tell the system, in addition to displaying the add-on column in the INSERT statement, "I'm going to show
General form: mysqldump-h ip-u user name-p database name > exported file name(1)-P can not add password, can only be entered as 1 in the same way (2) mysqldump is under the cmd command, no longer MySQL under, that is, can not enter the MySQL (that
Two possible types:1. Insufficient user rightsAssign all permissions to the user try itMysql> Grant all privileges on * * to [e-mail protected] "%" identified by "." 0 rows Affected (0.00 sec) MySQL>0 Rows Affected (0.00 sec)2. It is possible that
Method One: Find duplicate and redundant indexes through MySQL's INFORMATION_SCHEMA databaseSELECTA.table_schema as 'Database', A.table_name as 'Table name', A.index_name as 'Index 1', B.index_name as 'Index 2', A.column_name as 'repeating column
This blog will explain why a B + tree is used as an index, not a tree or a tree1. What is a B-tree(Image from Network)B-Tree related features: ⑴ keywords are distributed throughout the tree⑵ any one of the keywords appears on only one node⑶ search
Only InnoDB support transactions in MySQL.There are 4 characteristics of transactions1. atomicity (atomicity)A transaction contains a program that acts as a logical unit of work for the database, either all or none of the data in the database is
Because most of us use InnoDB, so this blog is mainly based on InnoDBB + Tree (image from Network)B + Tree graph from Network1. The difference between a clustered index and a nonclustered indexClustered index: Leaf node contains complete data
Mysql connection error: 1130-host... is not allowed to connect to this MySql server how to handle, 1130-hostallowed
This problem occurs because the user table in the mysql database on the database server does not have the permission (or even has no
MySQL common query statements
1. query numeric data:SELECT * FROM tb_name WHERE sum> 100;Query predicate:>, =, ,! =,!> ,! , = 2. query stringsSELECT * FROM tb_stu WHERE sname = 'Liu'SELECT * FROM tb_stu WHERE sname like 'Liu %'SELECT * FROM tb_stu
Mysql connection query for small jobs, mysql connection jobs
# Data preparationDrop table if exists class;Create table class (Class_no int (2) unsigned zerofill primary key auto_increment comment 'class number ',Class_name varchar (30) not null
Focus on basics-index operations that MySql cannot forget, mysql Indexes
Focus on basics-index operations that MySql cannot forget
I will not write the basic knowledge about MySql indexes here. I don't want to be a porter of information.
TIPS:
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