The SQL standard defines 4 levels of isolation. Lower levels of isolation can perform higher concurrency and lower system overhead. READ UNCOMMITTED (UNCOMMITTED)A transaction can read uncommitted data, called dirty reads. Rarely used. Read
1, execute the following code to implement a recursive query:Delimiter//CREATEFUNCTION' Getparlst ' (rootidINT)RETURNSvarchar1000)BEGINDECLARE stempVARCHAR (1000); DECLARE StempchdVARCHAR (1000); SET stemp =' $ '; SET Stempchd =Cast
Process:
Check if the time scheduler is on, off off, on
SHOW VARIABLES like ' Event_scheduler '
Set to open
Set GLOBAL Event_scheduler = 1;
Set the delimiter to ' $$ ', MySQL default statement delimiter is '; ',
You can reinit the password :1.stop MySQL/etc/init.d/mysql stop2.start MySQL Safe:mysqld_safe --skip-grant-tables &3.connect to MySQLmysql -u root4.change the passwordmysql> use mysql; mysql> update user set Password= password ("your_password")
1, first check whether the MySQL service is started, if it has been started to stop the service, can be run in the Start menu, using the command:Open the first cmd1 window, switch to the MySQL bin directory, and run the command:-- defaults-file= "F:\
The problem, because the UTF-8 encoding could be two, three, four bytes. Emoji emoticons or some special characters are 4 bytes, and MySQL UTF8 encode up to 3 bytes, so data is not plugged in.That's my solution.1. Locate the My.ini in the MySQL
Principle of a master-slave configurationMySQL replication is an asynchronous replication process that replicates from one MySQL instance (master) to another MySQL instance (Slave), where the entire replication process between Master and Slave is
SELECT *,count (*) as num from ' Wms_stock ' GROUP by SKU_ID,BATCH_SN have count (*) >1After-sale refund an order with two export batches for the same item, multiple packages, refunds with multiple records resulting in duplicate dataSELECT
I. Preparatory workThis experiment was performed on two ubuntu14, using mysql5.6, the precondition of the master-slave backup must be the same MySQL version, and have the same initial dataPrimary server ip:192.168.0.221From server
Install one of the MySQL methods, compared to the source package and RPM installation convenient manycan go directly to the official download binary packageNeed to uninstall MARIADB firstRPM-E Mariadb-libs--nodepsUnzip directly, moveTar zxf mysql-5.7
Modify the binlog location of mysql and mysqlbinlog
For the mysql service installed in the latest project, the allocated disk space is too small, so that binlog can be fully occupied in two days. The processing method is recorded here.
Mysql
Install and configure mycat and install and configure mycat1. Install jdk
Test whether jdk has been installed
[Root @ node002 ~] # Java-version-Bash: java: command not found
Create an extract directory
[Root @ node002 ~] #
Mysql: Query duplicate data and delete duplicate data. Only one data record is retained and one mysql retained.
Query the repeated data and number of repetitions of the user_name field in the text table.
Select user_name, count (*) as count from
How to clear mysql logs?
First, we can use the following command to clear MYSQL logs:
Rm-f/usr/local/mysql/var/mysql-bin .*
Restart your VPS. If LNMP is used:
/Root/lnmp restart
In this way, the unwanted junk log files are deleted. If you need
Win10 installation of MySQL5.7.18winX64 failed to start the server and no error prompt
1: Modify the environment variable path, added value D: \ Program Files \ MySQL Server 5.7 \ bin
2: I copied my. ini (It's my-default.in, my. ini is renamed
SQL Calculation of timestamp difference
SQL Calculation of timestamp difference
Overview
Sometimes we need to find some records by time, for example, calculate the record one hour before the sales time. SQL Calculation of timestamp difference
How to remotely connect to a MySQL database in Linux
Procedure
1. How to enable remote access to the MySQL database on the server
First, enter the mysql database, and then enter the following two commands:
Grant all privileges on *. * to 'root'
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