The ideal index:
Tables with very frequent table queries are indexed relative to write operations
High field sensitivity
The length is small (suitable length, not the smaller the better)
Try to cover characters commonly used
One of the features of the concat function in MySQL is that there is a value of NULL so no matter how much of the second character is returned as empty, this feature makes it possible for us to find it inconvenient in an instance application, but
Take the common user table, the article Class table, the log table to analyze the following CREATE table ' user ' ( ' id ' int (one) unsigned not NULL auto_increment COMMENT ' user ID ', ' Name ' varchar (255) NOT null COMMENT ' user name ', '
COUNT (*) is typically an index scan of a primary key, and Count (column) does not necessarily
COUNT (*) is the total number of records in the statistics table, count (column) is the number of records for all eligible columns in the tables
Count,
MySQLMysqldumpMysqladmiinMysqlcheckmysqlimportmysql-u username-h host-p "--protocol {tcp|socket|pipe|memory}--port port-d| --database, specifying the database to be used by default when logging onLess common options--compress, compression saves
When the system performance reaches the bottleneck, it is necessary to find out those operations on the performance impact of the system is relatively large, here you can use the database slow query log function to record some more time-consuming
Simple RoughTool XwampPath: H:\xampp\mysql\bin\my.ini.phpOpen the My.ini and add it under [mysqld]Skip-external-lockingSkip-name-resolveSkip-grant-tablesStop MySQL--open xwamp shell can enter commands, as followsSetting Environment forUsing XAMPP
1, XAMPP under Linux How to use the MySQL commandA:
Workaround (Recommend a second method):
1, the command tool in XAMPP in the/opt/lampp/bin/directory, so you can run the MySQL command
/opt/lampp/bin/mysql-uroot-p
2,
The complete syntax for the SELECT statement is:(7)SELECT (8)DISTINCT Select_list>(1) from Left_table>(3)Join_type> JOIN Right_table>(2) on Join_condition>(4)WHERE Where_condition>(5)GROUP by Group_by_list>(6) having Having_condition>(9)ORDER by
The company decided to use the new project MyBatis, although this has been learned but has not been used to forget almost, and the project is relatively tight, there is no time to learn a system point, had to be very sketchy Baidu to reach the
on theMySQL 3 node master-slave synchronous replication Scheme Six. Test master-Slave synchronous replication now let's test it out . MySQL master-slave synchronization. 1. Inserting test data in the main libraryInsert and delete 2 data to the
The simple format that MySQL gives to user rights commands can be summarized as:Grant permissions on database object to userA grant general data user, the right to query, insert, UPDATE, delete all table data in the database.Grant Select on testdb.*
1 Download the MySQL Zip package to extract to a directory that needs to be installed, such as D:\Local\mysql2 Create directory data under D:\Local\mysql3 copy My-default.ini to My.ini, modify My.ini configurationBasedir = D:\Local\mysqlDataDir = D:\
First, view the current database encodingShow variables like '%character% ';650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/3E/wKiom1c8A-7SxbjFAAAlDd_yQtY266.png "title=" 1.png " alt= "Wkiom1c8a-7sxbjfaaaldd_yqty266.png"/>You can see
In general, this condition indicates that the ' xxx ' user does not have permission, then it needs to give the user permission.How to open a MySQL remote account-1) first log in to MySQL with the root accountIn the Windows Host, click Start menu,
1, Connection MySQL format: mysql-h host address-u user name-P user Password1. Connect to MySQL on this machine. First open the DOS window, then enter the directory Mysql\bin, and then type the command Mysql-u root-p, enter after the prompt you to
1. View current user mysql> Select User (); # Querying the current user command statement+----------------+| User () |+----------------+| [Email protected] |+----------------+1 row in Set (0.00 sec)2. View all user information actionsMysql> select
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