At that time, we were preparing to build a project, so I built the lamp server and directly installed all the files in yum, because centos is a relatively stable system, therefore, none of the above software is up-to-date. apache is 2.2.15, php is 5.
The usage of tinyint, smallint, int, and bigint types in mysql is different:
In MySQL, the value range of Tinyint is-128 to 127. The unsigned range is 0 to 255 (see the official MySQL 5.1 reference manual.) Tinyint occupies 1 byte of storage space,
In the past, oracle databases were used for enterprise projects and mysql was used for new company projects.
1 In windows, mysql is case-insensitive by default. To make mysql case-insensitive. Change Method
Find the my. ini file in the mysql
Mysql has some time functions, although not commonly used, but sometimes used for interviews.
1. Convert the current time to the timestamp
select UNIX_TIMESTAMP();2. We generally do not directly describe the specific age about age. Because age is
The static format is the default storage format of the MyISAM table. This format is used when the table does not contain variable length columns (VARCHAR, BLOB, or TEXT. Each row is stored with a fixed number of nodes.
Among the three storage
For SQL beginners, the concept of NULL value is often confusing. They often think that NULL is the same as the NULL String. This is not the case. For example, the following statements are completely different:
Mysql> insert into my_table (phone)
Parsing: How to Create a foreign key in MySQL
Example:
1. master table
Drop table if exists 'biao ';
Create table 'biao '(
Id'int (11) not null auto_increment,
Title 'varchar (11) default NULL,
Content 'varchar (11) default NULL,
Primary key ('id ')
The following method can be used to solve the MySQL5 garbled problem:
1. Set phpMyAdminCopy codeThe Code is as follows:Language: Chinese simplified (zh-utf-8)
MySQL Character Set: UTF-8 Unicode (utf8)
MySQL connection verification gbk_chinese_ci
MySQL can use the field () function to customize sorting. The format is field (value, str1, str2, str3, str4). The value is compared with str1, str2, str3, and str4, 1, 2, 3, and 4 are returned. If null is returned or data is not in the list, 0 is
Today, I found that the mysql DATA folder with a backup has become abnormal. I found that there are three more files: ibdata1 ib_logfile0 ib_logfile1, the former is 18 m, and the latter two are 5 m each, it turned out that the migration was from
Test Table 1?
1 2 3 4 5 6 7 8
Drop table if exists test; Create table test ( Id bigint (11) unsigned not null AUTO_INCREMENT, Name varchar (100) not null default '', Type varchar (100 ), Create_time datetime, Primary key (ID) )
Install Mysql decompress version
-- @ Liang WP
1. Decompress mysql to a proper location
2. Right-click computer-properties-advanced system settings-advanced-environment variables. In the displayed "environment variables" dialog box, modify the
When I used load data to import the data in the txt file to mysql today, I found this error because the value in the foreign key does not exist in the associated table.
Load data local infile "E:/javaTest/SQL .txt" into table questionFIELDS
The following describes the advantages and disadvantages of each solution.Solution 1:Copy codeThe Code is as follows: SELECT * FROM 'table' order by rand () LIMIT 0, 1;This method is very slow. The reason is that MySQL creates a zero-time table to
1. Official documentsThe following excerpt describes utf8_unicode_ci and utf8_general_ci In the Mysql 5.1 Chinese manual:Copy codeThe Code is as follows:Currently, utf8_unicode_ci rules only support Unicode rules. Some characters are not supported.
1. Environment IntroductionOS: centos 6.5Kernel: 2.6.32-431.11.2.el6.x86 _ 64Node1: nginxha001 10.0.15.31 MasterNode2: nginxha002 10.0.15.32 SlaveVip: 10.0.15.30Note: drbd is used in this example. For installation of mysql, corosync, and pacemaker
When you work on a very large table, you may occasionally need to run many queries to obtain a small subset of a large amount of data, instead of running these queries on the entire table, instead, MySQL can find a few required records each time,
The SYS_CONNECT_BY_PATH function in oracle facilitates development. How does mysql implement similar functions?
DELIMITER $Create function 'getparentlist' (rootId VARCHAR (50) returns varchar (1000)
BEGIN
DECLARE sParentList VARCHAR (1000 );
We know that MySQL does not support conditional indexes. What is conditional index? A conditional index is an index generated after a certain filter is performed on the index Column Based on the WHERE condition. Such indexes have the following
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