CentOS 7 and Ubuntu 14 are installed under VM virtual machines.Centos 7 manually installed MySQL 5.5.45 (5.5 above version to be compiled with CMake)Ubuntu 14 is apt-get install Mysql-server mysql-client php5-mysql installed is also MySQL 5.5.45View
MySQL spatial extension (MySQL spatial Extensions), which allows direct processing, saving, and analysis of geolocation-related information in MySQL, appears to be the "official solution" for using MySQL to process geolocation information. But it is
If the front-end data, the back-end data are UFT-8 encoding, the program can not find any problems, but still appear to insert the database garbled, it is possible that the MySQL database server itself character set encoding problems
Use
MySQL Hot spare1 View the MySQL version to ensure that the main library is below equals from the library2 Main Library configuration:A need to open the support log function: Log-bin=mysql-binB provide server-id:server-id=1C restart MySQL, after
The column query refers to the result set returned by the subquery as a row of N rows, which is usually returned from a field query on the table.An example of a column subquery is as follows:SELECT * FROM article WHERE uid in (SELECT uid from user
After configuring MySQL to start, log in root user result prompt access denied for user ' root ' @ ' localhost 'Looked up the information, because the root temporary password is empty or wrong password, as if MySQL5.6 after the root default password
Update MySQL database Today a field of a table that involves subqueriesUPDATE T1set points = (Points-(Selectsum (point) fromt2wheret2_id not in (1, 2, 3, 4));The result is that the sum of the subquery gets the value null, and then the points of the
1 , install MySQL dependency packageYum install zlib-devel openssl-devel GCC-C++GCC Bison cmake ncurses-devel–y2 , build MySQL user and group, set up MySQL directory for storing data.Groupadd-r MySQLUseradd-g mysql-r-s/sbin/nologin MySQLMkdir–p/data/
Library Operations (database)1. Display Library:Show databases; Show all libraries that already existShow databases like ' conditions '; Conditional QueryConditional query:% matches 0 or more arbitrary strings. _ can match any one string. 2. View
Linkages between entities: the link between records and records of a table1-to-many, many-to-1Scenario: In a multi-terminal relationship, add a field to hold the entity identity of the current entity's contact end.Many-to-manyScenario: Add a
FOREIGN KEY constraintsFOREIGN key: Used to establish a connection between two entities.FOREIGN KEY constraint: restricts the correspondence between the records of the current table and the records of the associated table.Constraint restriction:
Trigger (Trigger)1. Role: Monitor a situation and trigger an action.The trigger can monitor the increase, deletion and change of the table, and make the operation of adding, deleting and changing.2. Create TRIGGER Syntax: (Requires early
(Stored procedure: (ForSQL programming, just know)1, stored procedures: similar to a function, is to encapsulate a piece of code. When you want to execute this piece of code, you can do so by calling the stored procedure. In the body of the
Character set and proofing rules1. Character set: A set of symbols and character encodings.2. Proofing Rules: A set of rules that are used to compare characters within a character set. 3, the installation of the database is best with our fixed code.4
MySQL data backup, its importance is self-evident. In general, we typically use mysqldump, xtrabackup, and LVM snapshots for backup, or a dedicated MySQL replication backup server.Characteristics:Logical Backup tool is slower than physical backup,
Create a new user under 1,mysqlGrammar:1.create user username identified by ' password ';Example: Create user Xiaogang identified by ' 123456 ';The newly created user, by default, does not have any permissions.2. How to assign permissions to
Note: The environment is the primary library single instance, from the library multiple instances.
The main library opens Logbin, confirming that the server ID is different from the library
[Email protected] backup]# egrep
MySQL failure:[Email protected]_m ~]#/etc/init.d/mysqld restartStarting MySQL ..... error! Manager of Pid-file quit without updating file.[[Email Protected]_m ~]#Possible one:The Basedir and DataDir directories in the boot profile/etc/init.d/mysqld
MySQL supports dozens of encoding methods, and the default encoding is: LATINL, if MySQL garbled situation, do not panic, to introduce you two ways to solve the encoding:In the console input command, note that the MySQL UTF-8 written in utf8, for
I. Type of indexB-tree Index:B-tree usually means that later values are stored sequentially, and each leaf page is the same distance from the root.B-tree indexed columns are stored sequentially, so it's good to look for range data.The B-tree index
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