Stored procedures and functions, a database object used to implement a set of SQL statement code about table operations as a whole, and the database object that is most closely associated with the database object table. In a database system, when
Business Requirements: User table R_user Save the user name and other information. Now need to set up a work base for each user, a user can have more than one work base, multiple users can also have a work base, that is, many-to-many relationships. (
Because see many friends also met me this situation, so take out for everyone to refer to, I use the Loganalyzer version is installed version:3.6.5Here first put: 650) this.width=650; "src="
Install MySQL with Yum under Linux 1. InstallationSee if you have installed:Yum List installed mysql*Rpm-qa | grep mysql* To see if there are any installation packages:Yum List mysql* To install the MySQL client:Yum install MySQL To install the
I. GrammarExplain For example: Explain select * from T3 where id=3952602;Two. Explain output interpretation+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+| ID | Select_type | Table | Type |
1. Introduction to Basic Environment 1.1 software environmentOperating system: Redhat Linux 6.3MySQL version: MySQL 5.6.241.2 Disk directory Planning
Serial number
Directory
Use
1
/opt/mysql/mysql-5.6.24
Learning content:MySQL basic data type.1. Number type:I. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
One byte range ( -128~127)
smallint (m)
Two byte range ( -32768~32767)
End the MySQL process first, using PS aux | grep mysql command get process ID number, kill ID number, end processSecond, run Mysqld--skip-grant-tablesThen, open a terminal, enter Mysql-u root MySQLAfter entering, execute update user SET
In the table structure of a relational database, in general, an ' ID ' field with the ' auto_increment ' extended attribute is defined to ensure that each record in the data table has a unique identity.In practical applications, getting to the
OverviewA trigger, as the name implies, executes a program when something (event) occurs. Triggers have four main elements:,,, 监视地点(table_name) 监视事件(insert/update/delete) 触发时间(before/after)触发执行程序(insert/update/delete)Grammar #创建触发器 Create trigger
Mysqlinnodb and MyISAM Two types of storage we can make it in the options when MySQL creates the table, as shown in:Here's the difference between the two types of storage:1. Two kinds of data storage transaction mechanism are differentInnoDB support
1. Open the MySQL profile My.ini, add the skip-grant-tables to the end of the file, or add it to the bottom of [mysqld] (directly added to the My.ini file at the end of the pro test can, but in [mysqld] I have not tried, Now this file as long as
1. Modify Root PermissionsGrant all privileges on *. * to ' root ' @ '% ' identified by ' root ' with grant option;--set specific host to have access privileges GRANT all privileges on * . * to ' root ' @ ' localhost ' identified by ' root ' with
Build a test environment1: CREATE TABLECREATE TABLE tab_index (id int (5), age int (3), DTE datetime);2: Inserting test dataINSERT into Tab_indexvalues (1, ' 2012-05-13 ', +), insert into tab_indexvalues (2, ' 2012-05-13 ', +); INSERT INTO Tab_
Digression: Initially very reluctant to write this no technical content of the blog, but online for fedora21 under the whole environment of the construction process of the article is very few, then I break an example:-P(i) Download of JDK and
1. Compiling the EnvironmentVisual Studio 2013Cmkake 3.1.3 (note version, in order to support vs2013)Bison 2.4.1MySQL 5.6.232. Install CMake, bison Note You may need to add the bin directory for CMake and bison to the PATH environment variableNote:
Want to implement Mysql>drop table like "prefix_%"There are no commands that are directly available, but can be assembled by MySQL syntax, select CONCAT ( " drop TABLE , GROUP_CONCAT (table_name), ) as statement from
This section describes how to install and configure MySQL.1 Installing the MySQL databaseThis section takes mysql5.1.49 as an example of the installation process for MySQL databases.Step 1 log in to the server as the root user.Step 2 Upload the
Mysql optimization Summary (1)
I. SQL _mode mode of mysql:
(1) This mode means that the SQL mode can control server operations, and the SQL mode exists at the global and session level. If you want to know the current value of global or session-level
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