Transferred from: http://www.ihref.com/read-16422.html1. To optimize the query, avoid full-table scanning as far as possible, and first consider establishing an index on the columns involved in the Where and order by.2. You should try to avoid null
1. If the default value is not set:SELECT userinfo.id, user_name, role, Adm_regionid, Region_name, Create_timefrom userinfoleft JOIN region on Userinfo.adm_ RegionID =
MySQL Database Common Commands1. mysql Common commandsCreate database name; Create a databaseUse DatabaseName; Select DatabaseDrop database name deletes databases directly and does not alertShow tables; Show TableDescribe TableName; Detailed
1, copyDateFolder Backup============================Hypothetical environment:MySQLInstallation Location:C:\MySQLThe Forum database name is:BBSdatabase backup destination:C:\db_bak\============================NewDb_bak.bat, write the following
Transferred from: http://blog.csdn.net/heiyeshuwu/article/details/49130567(Note: This article was written in 2011)
MySQL Monitoring
Tuning MySQL server hardware and OS operating system
MySQL Configuration
MySQL Schema
Source: The transaction support reproduced in MySQL is not tied to the MySQL server itself, but is related to the storage engine 1. MyISAM: Transaction not supported, for read-only program lift high performance 2.InnoDB: Acid transaction, row level
MySQL database user creation, authorization managementCreate a User:Command:CREATE USER ' username ' @ ' host ' identified by ' password ';DescriptionUsername-the user name you will createHost-Specifies the host on which the user can log on, if
Go from:http://www.2cto.com/database/201306/221329.html overview mha is a Japanese MySQL Daniel written in Perl a set of MySQL failover scheme, To ensure high availability of the database system. In the time of downtime (usually within 10-30
The modified users are listed as root.First, know the original MYQL database root password;①: Enter mysqladmin-u root-p password "New password" return in terminal command line, enter password: "Enter old password"②: Log in to MySQL system changes,
The concrete structure diagram is as followsTwo nodes a master one from (the library can be hung from the top of another from the library), or a dual-master, and then use the keepalived in the event of disaster tolerant high-availability
August 11, 2012 SAS 9.1.3 version with MySQL connection test, can connect with database1 direct connectivity via ODBC pass throughConnect to ODBCCREATE TABLE (or view)2 through AccessAccess connects to MySQL using the access connection ODBC,ODBC,
#!/bin/bashFor i in {0..63}Domysql-u$1-p$2-h127.0.0.1 Use Yoon;CREATE TABLE Ivc_pre_detail_$i(ID bigint NOT NULL,RefId bigint,Detailtype smallint,wid int comment ' Product number ',Wname varchar (comment ' product name '),num int comment '
Database1. Query the size of all data: data_length: Data size index_length: Index sizeSELECT concat (Round (sum (data_length+index_length)/1024/1024,2), ' MB ') as DATA from INFORMATION_SCHEMA. Tables\g2. View the size of the specified database,
There are three standard loops in a MySQL stored procedure statement: While loop, loop loop, and repeat loop. There is also a non-standard cycle mode: GOTO, but this cycle is best not to use, it is easy to cause confusion of the program, here is a
Set the MySQL service to allow extranet access, modify the MySQL configuration file, some my.ini, some my.cnf "Linux".1: Setting up the MySQL configuration file/etc/mysql/my.cnfFind Bind-address =127.0.0.1 to comment out;//function is to make it no
Mysql High Availability LVS + KEEPALIVE + MYSQL, lvskeepalive1. Architecture Diagram
Note:
(1) Mysql needs to remove the bind-address Configuration; otherwise, virtual ip access cannot be implemented.
(2) Disable all linux
Mycat continuous sharding-) custom number range sharding1. Custom number range Partition
You can customize the number range sharding and plan in advance which part of a range belongs to the sharding field. For example, you can partition the first
Analysis of a mysql slow query accidentYears ago, the project team received a public account. After the launch, the SQL statements used to query sessions in the cid column are dozens of times slower! I have been thinking about this problem for a
Mycat continuous sharding-) sharding by date (day)1. sharding by date (day)
Sharding by date (day): sharding by day from the start dateFor example, from, a shard is generated every 10 days.Note: You must plan and create the shards in advance.
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