Requirements Description :In MySQL, see how many days differ between two datesOperation Process :1. Through the DateDiff function, see how many days difference between two datesMysql> Select DateDiff('2018-06-26','2018-06-25'),DateDiff('2018-06-20','
Original function:
Update Categories SET display_order= 3,title = ' New Title 1 ' where id=1;
Update Categories SET display_order= 4,title = ' New Title 2 ' where id=2;
Update Categories SET display_order= 5,title = ' New
Tag: Mode file ORC mod mode IV TE must state1. Requirements:(1) must be 5.7.6 versions of MySQL(2) Gtid status is off2. Opening steps:(1): SET GLOBAL enforce_gtid_consistency = ' WARN ';(2): SET GLOBAL enforce_gtid_consistency = ' on ';(3): SET
The first stage: 1, be sure to correctly design index 2, it is important to avoid SQL statement full table scan, so SQL must go index (such as: all > MySQL storage and query billion-tier data
View status show VARIABLES like '%slow_query_log% 'Turn on set global show_query_log=1 (fail after reboot)Permanent effect Modification MY.CNF joinSlow_query_log=1Show_query_log_file=/var/lib/mysql/at-slow.logModify Time Threshold (default is
Installing the JDK1. Upload a local download of the compressed package, in the terminal input:yum install lrzsz wait for the installation to complete after input:rz Select File Add 2. go to the local directory to create the Java Directory
#一. Creating cases for stored procedures and stored functionsCREATE PROCEDURE myprocedure (in a int,in b int, out C int)BEGINSet c=a+b;EndCall Myprocedure (@num); #存储过程需要call to execute @num This is the result of execution, and we invoke it through
InnoDB engineThe InnoDB engine provides support for database acid transactions and implements four isolation levels for the SQL standard. The engine also provides row-level and foreign-key constraints, which are designed to handle a large-capacity
---restore content starts---common data types for MySQLFirst, what is the data type?Data types are data characteristics of columns, stored procedure parameters, expressions, and local variables, which determine the storage format of the data and
In enterprises, the high availability of databases has always been the top priority of enterprises, many small and medium-sized enterprises are using MySQL master-slave scheme, a master and many from, read and write separation, but single-master
Show GRANTS for [email protected];Flush privileges;SHOW processlist;#全局授权, Reclaim permissionsGRANT all on * * to ' testzzq ' @ ' localhost ';REVOKE all on * * from ' testzzq ' @ ' localhost ';Flush privileges;#数据库级别, Authorization, reclaim
MySQL restricts the size of packets accepted by the server according to the configuration file.Sometimes large inserts and updates are limited by the Max_allowed_packet parameter, resulting in failure.View current configurationShow VARIABLES like
First, the storage engineIt is recommended to use InnoDB, which is also the default storage engine used by MySQL, supporting transactionsSecond, the choice of attributesCharacter selection:1, char, fixed long, fast, there is the possibility of space
Learning Goals
Data backup
Data recovery
Database migration
Import and Export
Data backupA system crash or server hardware corruption can cause the database to be lost, so data backup is important in a production
Examples of items to buy:① Gets the quantity of inventory from the database.② Check if the quantity of stock is sufficient.The quantity of ③ inventory minus the amount purchased by the buyer (in the case of each user buying one).④ final purchase
I. BACKGROUNDThere is a need to migrate the database in the work, but can not stop the service, can not lock the library lock table affect the normal operation of the business, so use XtrabackupSecond, the environment:Operating system: CentOS Linux
This article will describe the basic operations of MySQL data. Pre-installation please self-BaiduOperating environment: Linux Ubuntu 16.04Command line connection
The main use of command operation in the work, requires proficiency in writing
The use of Tomcat's JDBC Pooltomcat jdbc pool requires only 2 jar packages, Tomcat-jdbc.jar and Tomcat-juli.jar respectively, the two jar packages can be found in Tomcat7, Tomcat-jdbc.jar in the Tomcat directory, Tomcat-juli.jar in the bin directory.
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