Data typeNumeric typeIntegerInt (m) four bytes (-2.1 billion ~21 billion)---java:intBigInt (M) eight bytes (18 square)---java:longFloating point numberFloat (m,d) single-precision floating-point number 8-bit precision four bytes m total number of D
Now there is a book table, which records the book information, the book ID is nh_id,Request to have a book chapter table, according to the chapter records the specific information of the book, foreign key nh_id corresponding to the Book table of the
1. Mathematical FunctionsABS (X) absolute valueCeil (X) rounding upFloor (X) rounding downRandom number of RAND (X) 0-1ROUND (x) the nearest integer from XROUND (x, y) holds the decimal number of the X-bit and uses rounding when truncatedPOW (x, y)
Note: The value of the statement must be a parameter with the @ symbol, not its own local variables, a @ called user variables, two @ is called a global variable. User variables: The current user's "global variables", the existence of the user state
First, create a databaseCreate and display a database that already exists.CREATE DATABASE MySQLdb; SHOW DATABASES;Second, delete the databaseDeletes and displays the database that already exists.DROP DATABASE MySQLdb; SHOW DATABASES;Third, the
The following are excerpts from the Code Audit: Enterprise Web code Security Architecture Book1.floor ()SELECT * FROM Test where id=1 and (select 1 from (SELECT COUNT (*), concat (User (), Floor (rand (0)) × from information_schema . Tables GROUP by
# backgroundToday, colleagues share the theme is Mysql-proxy, so come down to understand, do not seek mastery, just know this thing# IntroductionMysql-proxy is MySQL's official MySQL middleware service, which provides access to several mysql-client
1. IntroductionBinlog records database changes in the form of events. You can view events by executing the show Binlog events in "Binlog file" commandMysql> Show Binlog events in "mysql-bin.000002"; +------------------+-----+-------------+-----------
Table structureOne DB for a folder.One table two files The frm is a table structure, and IBD is the storage dataConnection layer:SockIpSQL Layer:Storage tiers:
MY.CNF Read Order
Observing the startup process (data directory)
- 授权用户(
Tag: Init row off SSI time down table function valueFirst, show profilesSee if the Profiles feature is turned onmysql> show variables like ‘profiling‘;+---------------+-------+| Variable_name | Value |+---------------+-------+| profiling | OFF
The structure of the Data table T1 table.Mysql> Show CREATE TABLE T1\g1. Row ***************************Table:t1Create table:create Table ' T1 ' (' id ' int (one) not NULL auto_increment,' Account ' varchar (+) not NULL DEFAULT ' ',PRIMARY KEY (' id
First, the construction of the database to optimize the table1. Core specification (recommended)
Table Character Set selection UTF8 (the Expression field is set separately to another character set)
The storage engine uses InnoDB
Do
Lab Environment:A total of 2 MySQL servers A and B, on the B remote backup a database on a, set up a database on a Google and Baidu, pay attention to the firewall on the 3306 port or shut down firewalls;Experimental topology:Experimental steps1) Set
Digital type
Type
Size
Range (signed)
Range (unsigned)
Use
TINYINT
1 bytes
(-128,127)
(0,255)
Small integer value
SMALLINT
2 bytes
(-32 768,32 767)
(0,65
How to reset the Root password for Mac MySQL
Note: You can reset the password of MySQL installed in Homebrew directly. For MySQL installed in other ways, you need to switch the corresponding installation directory.
After installing MySQL for a long
What should I do if I forget the mysql logon password?
Mysql password loss Solution1. Disable mysql2. Enable mysql by ignoring authorization login authenticationMysqld_safe -- skip-grant-tables -- user = mysql
-- Skip-grant-tables indicates that
Mysql's union usage and comprehensive application of subqueries, mysqlunion
Union query combines the query results of two or more SQL statements into a result set.
Example: sql1: N rows, sql2: M rows, sql1 union sql2 ---> N + M rows
1. Can I query
[MYSQL] syntax review, mysql Review
I. Data Types
Source: http://www.runoob.com/mysql/mysql-data-types.html
Ii. Basic statements
1. Create a data table
-- Primary key auto-increment, T_UserCREATE table if not exists 't_ user' ('id' int unsigned
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