1. Download and unzip2. Create a new My.ini file with the following content[MySQL] # set MySQL client default character set Default-character-set=utf8 [mysqld] #设置3306端口 port = 3306 # Set the MySQL installation directory basedir=d:\mysql-5.7.2
1.if statements delimiter \create procedure P1 () BEGIN DECLARE I int default 0 ; if i = 1 then select 1 ; ElseIf i = 2 then select 2 ; else select 3 ; End if ;end \delimiter; 2. Cycleintset num =0whiletendo Select
Trigger an action when a table is being hacked with a trigger1. Basic statement (also need to modify delimiter)#插入前: Create Trigger T1_i_b (trigger name) before insert on info (table name) each rowbegin ... end# insert create TRIGGER t1_i_a
Enumeration types and collection typesThe value of a field can be selected only in a given range, such as a radio box, a multi-marqueeThe enum radio can only select a value within a given range, such as gender sex sex male male/female femaleSet
MySQL formatted date: date_format (date, format)Date: Time fields format: Date formatFormat the date value according to the format string:%s,%s two digits in seconds (00, 01, ..., 59)%I,%I two digits in the form of points (00, 01, ..., 59)%H two
View: is a virtual table, which is the essence of your own definition of a query SQL statement, through this view (statement), you each time to get the view data is equivalent to using a SQL statement even query, generate dynamic datasets (data do
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"; +------------------+-----+-------------+-----------
1. Install MySQL successfully via Yum, enter start service command: sudo service mysqld start, failed2, tried many methods, also looked at the error diary:150325 11:37:46 [ERROR] Fatal Error:can ' t open and Lock Privilege tables:table ' mysql.host '
Typically, the maximum number of connections to MySQL is 100 by default, up to 16384.1. View the maximum number of connections:Show variables like '%max_connections% ';2. Modify the maximum number of connectionsMethod One: Modify the configuration
When using MySQL Workbench or navicat to connect to the server's MySQL, sometimes there will be access denied,Because no other user rights are assigned to MySQL, you can only log on locally, so set it up.Settings are as follows:Open the MySQL
Backup process
Create a backup directory$ cd ~$ mkdir backup$ cd backup
To create a backup Shell script:Vim databasenamebackup.sh#!/bin/bashMysqldump-uusername-ppassword DBName | Gzip > ~/dbname$ (date +%y%m%d%h%m%s).
MySQL Password loss resolution1. Turn off MySQL2. Start MySQL by ignoring authorization login verificationMysqld_safe--skip-grant-tables--user=mysql--skip-grant-tables indicates that authorization table validation is ignored3. Change the MySQL
Install mysql in linux (one-click installation of shell) and mysqlshell
1. Related Files (install_mysql.sh, my. cnf, and mysqld are at the bottom of the text)
2. Upload the above files to a directory on the linux Server
3. Grant the execution
Detailed steps for full uninstallation of MySQL5.7 and detailed instructions on uninstallation of mysql5.7
This article focuses on the various uninstallation and cleanup issues that may occur during MySQL reinstallation. I hope it will be helpful to
Mysql installation-free version configuration and password change tutorial, mysql installation version
Step 1: Configure environment variables (My decompression path: G: \ mysql \ mysql-5.7.21-winx64)
MYSQL_HOME = the decompressed path
PATH =
Commonly used MySQL commands in Linux system: linuxmysql
Service:
# Chkconfig -- list all system services# Chkconfig -- list | grep on lists all started system services
# Chkconfig -- list mysqld
# Whereis mysql viewing File Installation path#
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
How to synchronize data from MySQL to MongoDB !, Mongodb Data Synchronization
With the business development of many companies, a single database instance can no longer meet business needs, and data exchange needs to be conducted regularly to
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