Example: http://www.sina.com,http://www.baidu.comThe first 10 characters are the same, indexing starts with the 11th character and is a waste of resources. Here are two tips to solve this problem:1. ReverseSort data in reverse order:
in the When you delete a table or a piece of data in MySQL, it appears[ERR] 1451-cannot Delete or update a parent ROW:A FOREIGN KEY constraint fails (...) This is because the foreign Key association is set in MySQL, resulting in the inability to
ViewA view is a virtual table (not a real one), which is essentially "getting a dynamic dataset from an SQL statement and naming it", which allows the user to get a result set using only "name" and use it as a table.Temporary table SearchSelect
To some extent, MySQL has only b-tree indexes. He has no bitmap index. There is also a hash index, only in the memory storage engine.The B-tree index is similar to that in Oracle.MySQL restrictions on B-tree:Only the full value blend is done or
Delete from ZQZRDPwhere Tel in (select min (dpxx_id) from ZQZRDP GROUP BY Tel has count (tel) >1);Run, errorThe exception is: You cannot specify the update of the target table in the FROM clause. It's silly. MySQL writes like this, no, it makes
The following error occurs when inserting Chinese in the operations database:ERROR 1366 (HY000): Incorrect string value: ' \xc4\xe3\xba\xc3 ' for column ' username ' at row 1Solution:View the encoding settings for the current database in cmd: Server,
The concept of a data setOpen Source : MySQLEfficient :High cost performanceDatabase , means to be stored together in a certain way. , can be shared for multiple users , features with near-possible small redundancy . are applications that are
For example, to modify the field username in the table user to name:ALTER TABLE User change username name VARCHAR (20);Other Modifications to table field information:1. Add Field: Add field to table user password after ID;ALTER TABLE user ADD COLUMN
Displays the total population and area of each region. Only those areas with more than 1000000 area are shown.SELECT Region, sum (population), sum (area) from Bbcgroup by regionhaving SUM (area)>1000000Here, we cannot use where to filter more than 10
To view the server version:Cat/etc/redhat-releaseTo view the MySQL version:Mysql-u root-pUse MySQL;# # #mysql 5.7 or more.Update user SET authentication_string = PASSWORD (' newpassword ') WHERE user = ' root ';# # #mysql 5.7 A second old
VSFTPDVSFTPD is "very secure FTP daemon", security is one of its biggest features, the following look at the rapid configuration of VSFTPD.VSFTPD Main configuration files:
1. Enter the databaseMysql-u root-pEnter password2. Enter after entering:Use MySQL;3. Directly from the Connection Client tool, select the database mysql->user table inside copy Create, do not know how to configure remote connection, refer here 4.
650) this.width=650; "class=" AlignCenter wp-image-70519 "src=" http://www.linuxprobe.com/wp-content/uploads/2017/06 /mysql-300x150.jpg "alt=" MySQL query caching feature is now a bottleneck! MySQL's query caching feature is now a bottleneck! "Width=
1. When using the INSERT statement, if there is no data in the original table, then the newly inserted data is new for the table after inserting the data:2. When a DELETE statement is used, the deleted data is OD, relative to the data in the table
Query Users:Select User from User; Authorization permission: Grant the specified permission:Grant Insert,Select on *.* to 'user_name'@'localhost' with Grant option; (*.*For example: A.B=Table B in database a grants all permissions:Grant All
MySQL optimization:Each InnoDB table must have a primary keyLimit the number of indexes on a table and avoid establishing duplicate and redundant indexesCareful selection of the order of compound index key valuesPrioritize the smallest data types
mysqlbinlog --database= database name--start-date= "2017-06-01 5:00:00"--stop-date= "2017-06-11 10:00:00" var/ mysql-bin.000001 | MySQL -u root-p123456-f1, note the location of the bold Word executable file, if you have added environment variables
Mysql user Common Operations
1. Create a user:Command: create user 'username' @ 'host' identified by 'Password ';Description: username-the username you will create, host-specifies the host on which the user can log on. If a local user can use
Difference between In and where In SQL and between sqlinwhere
The meaning of In and Where In SQL statements is different.The application is explained as follows:1. If you need to select, delete, and update data from a table with conditions, use
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.