The previous understanding of InnoDB on the occurrence of lock waiting, will be based on the configuration of the parameters Innodb_lock_wait_timeout, determine whether to do a timeout operation, this document describes in the presence of lock
Simple single-table operation(1) Simple crud
Insert Query Results
Insert INTO table1 (id,name,age) Select Id,name,age from table2 where id=1
Update action
Update table name set field name = ' abc ' WHEREid=
1. Please describe the relationship between database, table and database server. Knowledge points Database storage StructureA database server can manage multiple databases, typically a developer creates a database for each app, and to save data for
1. Install MySQL in Ubuntu Server (remember to set the password in the process)Sudo apt-get Install MySQLSudo Apt-get Install Mysql-serverSudo Apt-get Install Mysql-clientNote: There is a problem with MySQL not installed here, prompting Dpkg:error
1. Download MySQL for mac:https://dev.mysql.com/downloads/installer/2. Double-click mysql-5.7.17-macos10.12-x86_64.dmg to Unzip, double-click mysql-5.7.17-macos10.12-x86_64.pkg to install3. Continue, Continue, Agree, Install, enter the administrator
1. Download the installation package on the official website: https://dev.mysql.com/downloads/mysql/5.7.html#downloadsMysql-5.7.10-linux-glibc2.5-x86_64.tar.gz2. Upload the installation package to CentOS. The directory I installed is in/usr/local/1[[
Sometimes it is considered that count (*) is slower than count (1) or count (column name) and is actually handled in a sub-case.Like what:---initialization statementsCreate a table and insert the data:Create table test2 (id BIGINT PRIMARY key, name
First trick, start and stop of MySQL servicenet stop MySQLnet start MySQLSecond move, login MySQLThe syntax is as follows: Mysql-u user name-p user PasswordType the command mysql-uroot-p, enter the password after entering, enter 12345, and then
Some time ago, the project needs to be stored in the database emoji, due to the wrong encoding format, directly lead to database error, and then modify the MySQL code, it solvedEmoji symbols are actually text, not pictures, they are only displayed
MySQL Master-slave replication principleMysql Master-Slave synchronization is actually an asynchronous replication process, in order to achieve replication first need to open the Bin-log log on master, the entire process needs to open 3 threads,
Common phenomena:The MySQL master-slave server is often maintained in operations, but from the library we are only used for reading.General access is only authorized to read account, but sometimes maintenance work may not be a person doing, you can
MyISAM and InnoDB explanationInnoDB and MyISAM are the two most common table types used by many people when using MySQL, both of which have pros and cons, depending on the application. The basic difference is that the MyISAM type does not support
Unlike Oracle and Sqlserver,mysql, which do not support querying the data of a table and querying for the updated condition, we need to use the following statement bypass:UPDATETeaching_departmentSETCode_year= ., Notice_code=(SELECTA.code+ 1
Source: http://blog.itpub.net/15498/viewspace-2136006/Due to the upgrade of the database, today in the execution of SQL file from MySQL 5.6 times wrong:Mysql> Source Cms_user.sqlQuery OK, 0 rows Affected (0.00 sec)Query OK, 0 rows affected, 1
Stored procedures and functions are a collection of SQL statements that have been compiled and stored in a database, except that the function must have a return value, and that the stored procedure has no parameters for the stored procedure to use
MySQL is older (not the old MySQL software, but that the set of MySQL function in PHP is older), and there are many shortcomings and deficiencies, As a result, this set of extensions was deprecated in the PHP5.5 version, removed in a new version of
Index and trigger, index trigger
1. Meanings and features of indexes:
What is an index? The index is equivalent to a directory sequence table in the dictionary. For example, if you want to query a "star" word, if you do not search for it in pinyin,
Translation: create database statement, createdatabase
This article is the translation of the mariadb official manual: create database.
Original article: https://mariadb.com/kb/en/create-database/Https://mariadb.com/kb/zh-cn/create-database/ I
Mysql common operators and functions and mysql Operators
Create a data table first.
Use test; create table 'employe' (emp_no int unsigned, emp_name varchar (30), emp_sex varchar (3), emp_age tinyint unsigned, sal double, history datetime ); insert
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