MySQL log:140614 9:45:36 [Note] Plugin ' federated ' is disabled.140614 9:45:36 innodb:the InnoDB memory heap is disabled140614 9:45:36 innodb:mutexes and rw_locks use Windows interlocked functions140614 9:45:36 innodb:compressed tables use zlib 1.2.
Create a TriggerGrammar:Create TRIGGER Trigger NameCreate trigger Xiaoshou_update_trigger after update on Xiaoshou for each row begin update Jiangjin set xiaoshouer= (select SUM (Taoshu*danjia) from Xiaoshou where Userid=new.userid and
MySQL Custom sort orderExample: Adding an ORDER by FIELD (status,3,4,0,2,1) statement to a SQL statement defines the sort orderSELECTtsdvoucher0_. voucher_id asvoucher1_0_, Tsdvoucher0_.comment_device_type ascomment2_0_, tsdvoucher0_.comment_id
MySQL Lock:There are many types of locks inside MySQL, which can be divided into two categories depending on the purpose:1. Lock that protects the memory structureThe server layer is basically protected with Mutex,rwlock for thread-shared
Open Navicat MySQL management toolConnecting to a databaseSelect Test DatabaseClick QueryEnter the corresponding SQL commandCreate TableTuser (unamevarchar( -) not NULL Primary Key, Upwdvarchar( -) not NULL );Create TableP_info (Pkeyvarchar( the)
I found the password was wrong when I logged in to MySQL with the root user.[Email protected] ~]# mysql-u root-pEnter Password:ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)Workaround1. Stop MYSQLD
in order to learn the ORM, chose the EntityFramework, experienced three days and two nights of suffering, n times wrong, in the group of the help of master, finally succeeded, now will my mind history record down, one is let oneself have a record,
Overview
There are two ways to import and export mysql Databases
1) Export the SQL script first and then import it (there are two types of Import and Export: 1. commands. 2. Tools. Here we only introduce commands ).
2) directly copy database
Operating System: win7
Mysql version: mysql 5.5 (64-bit)
1. Re-installing mysql stops at the last step.
Problem description: After mysql is installed for the first time, Chinese characters written using jdbc are garbled, but Chinese data already
Customize a mysql STARTUP script according to the working environment
--- 1. Save As/usr/local/mysql/scripts/mysql_env.ini
# Set mysql init variablesMYSQL_USER = system # mysql UsernameMYSQL_PASS = 'Password' # mysql logon User password
# Check
This article summarizes all the tools related to MySQL O & M development and will be continuously updated.
1. Toolkit set
Percona-toolkit: http://www.percona.com/software/percona-toolkit
Oak-toolkit:
Let's take a look at the width range of integer data types.
Create a table
Copy codeThe Code is as follows:Create table tb_emp (id BIGINT (1 ))
The data type of the id field is BIGINT (1). Note the following number 1, which indicates the display
(1) Data Type
Type
Remarks
Tinyint/smallint/mediumint/int/bigint
1B/2B/3B/4B/8B
Float/double
Single precision/Double Precision Floating Point
Decimal
No single-precision/double-precision floating point
Basic FormProperty name regexp 'matching Method'Regular Expression Pattern character^ Starting from matching charactersEg1: query records starting with L from the name field of the info tableSelect * from info where name regexp '^ l ';Eg2: query
Copy codeThe Code is as follows:#/Usr/share/mysql/my-huge.cnf# MariaDB configuration file sample template (huge, giant ).## This file applies to dedicated database servers with a memory of 1 GB to 2 GB.# Only large MariaDB systems are running on the
When using MySQL, you often create an auto-increment ID field in the table and use the auto-increment ID to quickly create an index. This is also a recommended method for MySQL. However, this method may cause synchronization failure due to
After two insert date types recently, the value is 0000-00-00 00:00:00, so I checked the official documentation and found the reason.
In Mysql, we often use three data types to store dates: Date, Datetime, and Timestamp.
The Date data type is used
PREPARE statement_name FROM SQL _text/* definition */
EXECUTE statement_name [USING variable [, variable...]/* EXECUTE preprocessing statement */
Deallocate prepare statement_name/* delete definition */This is used in my project for
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.