Recent projects have used the ability to build tables in bulk using stored procedures, which are documented: UseDb_test_3;Drop procedure if EXISTS' Createtableswithindex ';Create procedureCreatetableswithindex ()BEGIN DECLARE`@i`int( One);
1. Requirements: Change the nickname in the review form to the last 4 digits of the mobile phone number.UPDATE SET = MID (Issuer_name,4,6WHERE=One and like' 1% ';2. Due to Misoperation (mid (issuer_name,4,6) is the middle 6 bits), data rollback is
In a lot of times, it's better to be neat than to be clear. The plan should be based on the scene to design, not blindly rely on experience, of course, this is also a new experience!Demand is the company's several sets of public system made through
Updating data: Update table name set health name = "changed value" where built = ...Delete data: Delete from table name where ...Index: CREATE index name on table name (key name);Create the attempt: the Create View name (key, key) as SELECT
Some time ago, a rather senior programmer asked me what is called the index, I am very surprised, I think this will not be bucket, because there are thousands of developers (probably mostly using MySQL) have not received the formal training of the
1. Create a new user.//log in to MySQL@>mysql-u root-p@> Password//Create usermysql> INSERT INTO Mysql.user (Host,user,password) VALUES ("localhost", "abc", Password ("1234"));//Refresh System Permissions TableMysql>flush privileges;This creates a
Today, in a situation, write down:Select * from Table where a= and b=xxxorderby8,2 ;Select * from Table where a= and b=xxxorderbyten,2 The two statements are supposed to return completely different results.But in my program, there's a line that's
First, prefaceMysql replication as a read-write separation of the cheap solution, support a master multi-standby way of data storage, the use of binary log shipping, there is a wide range of applications, online related concepts are more, no longer
Mysqldump backup mechanism: Through a given parameter information and system table data, a table to get the data and INSERT statements inserted into the backup file, so because of inconsistent time, will result in inconsistent data, but for a system
For example:There is a Type field in the article table, he stores the article type, there are 1 headlines, 2 recommended, 3 hot, 4 graphics ..... 11,12,13, wait.Now there is an article he is a headline, but also hot, or graphic,The type is stored in
MYSQL Bin-log logs are used primarily for data backup and recovery, and its files save all additions and deletions to the database. 1. Open Bin-log log: 2. View Bin-log logafter connecting to a successful databaseto see if the Log_bin is open
Set environment variable path, point to the bin directory under MySQL
Modify the My-default.ini under MySQLBasedir=%mysql_home%Datadir=%mysql_home%\data
To the MySQL bin directory to executeMysqld--install(Delete Service is MySQL--remove)PS:
Basic MySQL database commandsMysql-uroot-p password // LoginCreat database people; // createDrop DATABASE name // DeleteShow databases // view all databasesUse Database Name // use a database show tables // display all tables in the current
Compile and install MySQL5.5.x in Linux source code
Linux: CentOS 6.5
MySQL version: 5.5.20, attached: [Click to download]
1. Install cmake
MySQL 5.5 and later versions have been replaced by the cmake tool./configure compilation and configuration
Configuration items I have adjusted to improve mysql PerformanceSkip-external-locking: skips the external lock. To understand this parameter, you must first understand external-locking (external locking is used to lock the MYISAM data table under
10. mysql Import and Export DatabaseImport and Export mysql database commands in linux1. Use the mysqldump command to export the database
(Note: If this command is not available, run this command in the mysql installation path ):1. Export data and
Mysql fuzzy query optimization
First, create an index for the fields to be searched in the database (mysql index is unfamiliar, please refer to here ).
Secondly, use the following function for fuzzy search. If the position is greater than 0, it
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