Recently, a deadlock problem was frequently encountered on the database. The problem with performance is1. There is a query for:1) A complex select Investigates a large set of data2) Use transactions to update the state of this set of dataIn order
Create a tableCREATE TABLE ' T1 ' (' id ' int (one) not NULL auto_increment,' msg ' varchar (+) not NULL DEFAULT ' ',' crcmsg ' int (+) is not NULL DEFAULT ' 0 ',PRIMARY KEY (' id ')) Engine=myisam auto_increment=3 DEFAULT Charset=utf8Inserting
First, the primary database configuration assumes that the primary database IP address is: 192.168.1.1 Modify my.cnf Add configuration under [Mysqld] server-id=1Log-bin=syslog ##################################### Open LogBinlog-do-db=cmstop ########
MySQL Engine:Archive (archives) [data insertion cannot be modified after, read-only]blackhole[This write operation is to delete the data, the read operation is to return a blank record]Csv[a comma as a delimiter between data items when storing
Export command:Mysqldump-t--skip-extended-insert-utest-p TestDB TableA > Testdb_tablea.sqlParameter description:- T: Export data only, without schema (build table, Index)--skip-extended-insert: Export INSERT statement One row of data, the default
--"MySQL source" source to install and start MySQL--------------------------------------2014/08/19Native Environment: UBUNTU12.04,FEDORA-17MySQL version: 5.5.28CMake version: 2.8.9One. Download the latest version of the CMake, unzip the installation
When using MySQL, you often encounter table names that do not conform to specifications or standards, but the tables already have a lot of data, how to keep the data, just change the table name?You can import the original data into a new table by
recently, a tool has been developed using ADO to parse a log merge library (MYSQL) as followsAll-xx:panax notoginseng: [INFO ] rolename=♣, Innova, orderid= 1408190037102121039, price=10.0, point=found in the rolename in the storage after the ♣
1.mysql module is not the official module of Nodejs, is a third-party module> NPM install MySQL//automatic installation includes other packages that the MySQL module relies onIn fact, this is the installation of a MySQL client,2. Code:Returned value:
began to do Python database access, temporarily selected MySQL database. Originally wanted to use the ORM, and later considered the project situation is: Table structure is not complex, but the database is very large. I still have to operate SQL,
1. Number of system mysql processesPs-ef | grep "MySQL" | Grep-v "grep" | Wc–l2.slave_runningMySQL > Show status like ' slave_running ';If the system has a slave replication server, this value indicates the health of the server from
Mysql time int date conversion, mysqlint date
Select from_unixtime (1350437720 );Select unix_timestamp (now ());Insert with unix_timestamp (date)Query with from_unixtime (int)
Convert datetime to int format in mysql
Select unix_timestamp ('2017-07
Simple installation and use of sphinx in windows, and installation of sphinxwindows
1. http://sphinxsearch.com/downloads/release/, here I am using “win64 binaries w/MySQL + PgSQL + libstemmer + id64 support ", downloaded file name:
Mysql decompression and authorizationDecompress mysql compressed version to a root directory
Note the content configuration of the INI File
Basedir = D: \ mysql-5.6.17-winx64Datadir = D: \ mysql-5.6.17-winx64Port = 3306Server_id = mssql
In Linux, use mysqladmin extended-status in combination with Linux commands to view the MySQL running status and extendedstatus
Mysqladmin is an important MySQL client. It is most commonly used to shut down the database. In addition, this command
Having has some differences in Oracle and mysql
In Oracle, having must be used in combination with group by, but in mysql, the situation is different and can be used separately.
C: \ Documents ents and Settings \ guogang> sqlplus test/testSQL * Plus:
Mysql-views, stored procedures, and triggers
I. VIEW
A view is a virtual table and does not store any data. Only the running time contains the dynamically retrieved data.
Eg: SELECT sid, name, sex, s_num FROM student, school WHERE sid = 2 AND
Two-Point usage of Mysql string function FIND_IN_SET ()
Summary: You can query fields separated by commas and forcibly sort the results.
First, let's look at a table:
Colid
Vyear
Area
Cast
, 31,32, 21,12
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