Yum install MySQL1 yum-y Install Mysql-server2 Setting up start-up managementChkconfig mysqld on3 starting the MySQL serviceService mysqld Start4 Setting up a MySQL user admin passwordMysql-u RootSet password for [email protected]=password (' root ')
After installing MySQL, the default boot will not start automatically, you need to manually set up MySQL let it boot from boot.First, with the Chkconfig command to see if MySQL is not in a manageable list, the command is:Chkconfig--listMessagebus
1. Create User: ' username ' @ ' host ' identified by ' password ';Username: User name; host: Specify on which host can log on, the local machine is available localhost,% all remote host; password: User login password;2. Authorization: Grant all
MySQL Performance optimization Related:To view a running SQL process:# mysql-u root-p ' xxxx '-e "show processlist;"Generally sleep too much will consume higher CPU and other resources# mysql-u root-p ' xxxx '-e "show processlist;" | grep Sleep | Wc-
What is a trigger
Features and functions
Example: Create a trigger, record a table's increment, delete, change operation record
Disadvantages
What is a triggerSimply put, a table has something (INSERT, delete, update operation), and
Index overview
1) All MySQL column types can be indexed and using indexes on related columns is the best way to improve the performance of select operations.2) Depending on the storage engine, you can define the maximum number of indexes and
One, MySQL storage engine Second, how the storage engine chooses
Whether the transaction is supported
Retrieving and adding speed
Lock mechanism
Cache
Whether full-text indexing is supported
Whether foreign keys are
1, the first type:INSERT [into] tbl_name[(col_name, ...) {VALUES | VALUE} ({expr |default}, ...), (...), ...If you assign a value to an AutoNumber field, you can use NULL or default to allow it to be implemented in the form of an increment that is
Xtrabackup at the time of the backup while reading the Redolog and bin-log position, and finally apply the Redolog to the database file, it is possible to implement the hot standby machine, do not lock the table to synchronize the master data to
Binlog Introduction
Binlog, the binary log, which records all changes on the database.
At the end of the SQL statement that changes the database, a record is written at the end of the Binlog, and the statement parser is notified, and
#mysql basic Commands#1, view all databases#show databases;#2, creating a database#create database dbname;#3, using the database#use dbname;#4, view the tables in the library#show tables;#5, creating data tables#filid int PRIMARY Key
For large-scale Internet applications, the amount of data in a single table can reach tens of millions or even billions of dollars, while facing this high level of concurrency pressure. Master-slave structure can only extend the read ability of the
First, FOREIGN KEY constraintsEnsure the integrity of the data.To define a FOREIGN KEY constraint:Foreign keys can be defined directly in the CREATE statement foreign key current table name (field name) References target table name (primary key of
There was a problem starting up after the binary installation (MySQL is installed under/APPLICATION/MSYQL):[[email protected] bin]#/etc/init.d/mysqld startStarting mysql.170320 22:21:51 Mysqld_safe the File/usr/local/mysql/bin/mysqldDoes not exist
Name
Age
Phone
Chen
25
134xxxx
Zhang
30
158xxxxx
Grammar: create procedure Procedure name ([ [in| Out| INOUT parameter name data type [ ,[in| Out| INOUT parameter name data
1.1 RequirementsDatabase 3 million user data, traverse get all users, various combinations associated, get to a new JSON, save to Redis.1.2 DifficultiesDatabase is much more, it is impossible to single-threaded query all the data to memory.1.3
Recently started to learn MySQL, because the school is a bit miscellaneous, to my head, to clarify the idea for a long time ....Now just a little thought, first write down for everyone to refer to, in fact, only me haha haha ~ ~ ~I use the Express
Today in the design of the table, there is a small problem, because do not know how long the future will be stored data (data is provided through the third-party HTTP interface, according to sample display, the data is probably as follows:)That is, 6
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