1. Null and non-emptynull field can be NULL NOT NULL cannot be empty2.auto_incrementAutoNumber , must be used with primary key, by default, starting value is 1, each increment is 13.PRIMARY KEYPRIMARY KEY constraint, there is only one primary key in
Five statistical functions (used alone, with little meaning, often used in combination with grouped group by)Max Max select Max (shop_price) from goods;Min min Select min (shop_price) from goods;Sum sum select SUM (shop_price) from goods;AVG
Left and right connectionsFull multiplication method (very low efficiency)Mysql> select * from Test10;+------+-------+| ID | sname |+------+-------+| 1 | Cloud || 2 | Moon || 3 | Star |+------+-------+3 Rows in Set (0.00 sec)Mysql> select * from
One, what is MySQL multi-instanceThe simple thing is to open several different service ports on a single machine (for example: 3306, 3307) and run multiple MySQL service processes that provide their own services through different sockets that listen
First see if the port is open Netstat-an|grep 3306This figure is on port 3306, which was previously shown as ... 127.0.0.1:3306 ...Open MySQL configuration file vi/etc/mysql/mysql.conf.d/mysqld.cnfLog Off bind-address = 127.0.0.1?Re-start UbuntuSee
First, the basic principle of MySQL master-slave backup (replication)MySQL supports one-way, asynchronous replication, during which one server acts as the primary server, and one or more other servers act as slave servers. MySQL replication tracks
Recently depressed, the conversion between the underlying type and Java type is unclear, and by the way the information on the Internet lists some types to remindMysql1, integers:
MySQL data type
Meaning (Signed)
The 1.mysql character set has detailed settings:The 2.mysql character processing mechanism is that there is a character set converter between the database and the client (the later abbreviation Converter) converts the client character encoding
Database Basic TypesChar fixed-length string char (10) memory two-bit 10-bit query has advantagesvarchar variable-length string varchar (10) Two-bit two-bit storage advantageEnumeration type can only take oneThe set type can take multipleBinary type
1) Prepare two MySQL services and start the service127.0.0.1:3306 Host127.0.0.1:3307 slave MachineBefore and after the master-slave configuration needs to confirm the two machine instances between the library, table, data consistent, otherwise it
MySQL Security Configuration Zhangsan 2014/06/14 11:550x01 Preface
Many articles will say that the permissions of the database according to the principle of minimum permissions, the sentence itself is not wrong, but it is an empty word.
One problem that is found today in MySQL's not-in use is roughly:Select * from where not inch (Select from B).found that the query results are 0 records anyway. Later found that the query result set returned in B has a null value, looked up the
Precautions:As long as the following 4 points, 2 MySQL can be installed simultaneously to a machine PS: Can extrapolate, a machine as long as you load enough, want to install a few can. Here are 2 examples:My test server is configured to 2 6-core
Group queriesMysql> Select CountryCode as Total fromcity where id+-------+| Total |+-------+| AFG || AFG || AFG || AFG || NLD || NLD || NLD || NLD || NLD |+-------+9 Rows in Set (0.00 sec)Mysql> Select Countrycode,count (*) Astotal from the city
first of all, to popularize the simple way to install MySQL:yumYum Search MySQL (find out what's on MySQL)3 items to install after finding
Mysql.i386
Mysql-server.i386
Mysql-devel.i386
Service mysqld start after installation
http://www.cnblogs.com/zhuyp1015/p/3561470.html install MySQL on Ubuntu is very simple and requires just a few commands to complete. 1. sudo apt-get install mysql-server 2. Apt-get Isntall mysql-client 3. sudo apt-get install Libmysqlclient-dev the
#!/bin/bash # # # #需要部署数据库的IP列表 # # # #ip192.168.1.10 #ip192.168.1.11 #ip192.168.1.12 #ip192.168.1.13 # ip192.168.1.14 #ip192.168.1.15 ##### #执行脚本前, please make sure that the Yum source is available, and that it can be used. Cd/root myb=
--Get the time before the current time interaval The following argument is a few days before the date (Date_sub (now (), INTERVAL 1 day);--transcoding cast (Countreg as Char) cast (CONCAT (' "+ Download+ "', Adid) as char) as apk--connect two or
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