Mysql
Index, or the query is slow
Note whether the time type will be refreshed after update
Design Logic Delete Enable
NULL, string numeric operation with function Ifnull (total,0), design-time default value
String type (if it
Today's database connection, suddenly found that the database password forgot, this can do, really scared the baby, through the experiment, finally found a method, only for reference ...The general approach to accessing the database is as follows:
One, the use of Timestampdiff (interval,datetime_expr1,datetime_expr2)Returns an integer difference between a date or datetime expression Datetime_expr1 and datetime_expr2the. The unit of the result is given by the interval parameter.Instance:Select
Then delete the My.ini file and all files under the MySQL folderRun the "regedit" file, open the registryDelete Hkey_local_machine\system\controlset001\services\eventlog\application\mysql folderDelete the
First, the conceptMySQL Replication (replication) is an asynchronous replication that replicates from one MySQL instance (Master) to another MySQL instance (Slave). Implementing the entire master-slave replication requires the IO process on the
"description" the morning on the server deployed its own web directory (Tomcat virtual directory), the afternoon installed and learned Nginx (a bit of a problem, later resolved), the evening to try Nginx and Tomcat configuration (confused)One:
Explain shows how MySQL uses indexes to process SELECT statements and join tables. Can help select better indexes and write more optimized query statements.Using the method, add explain to the SELECT statement, such as:Explain select * from Statuses_
Environment:Centos 7.0Apache 2.2.27Mysql 5.1.72Libiconv 1.14# #Apache Please use the compilation installation yourself. Content copied from my own word, wold inside is good, and some places copied over overlapping, look at the time to pay attention
Let MySQL support emoji expression solution: convert MySQL encoding from UTF8 to UTF8MB4. Requires >= MySQL 5.5.3 version, (can also be detected 5.5.29) Low version does not support this character set, copy error stop MySQL Server serviceModify
. Cascade ModeSynchronize update/delete out a matching record of a child table when Update/delete records on the parent table. Set Null methodSet the column of the matching record on the child table to NULL when the record is update/delete on the
Mysql>show Global variables like '%server% '; --View the current global character set+----------------------+--------------------+| variable_name | Value |+----------------------+--------------------+| Character_set_server | Latin1 ||
1, modify the MySQL port number, to avoid the firewall to prohibit the opening of Port 3306; In the My.ini configuration file2. Create a MySQL user,Then give him permission,
Mysql-u root-p//login MySQL
Mysql> Grant all privileges on * * to '
Used to like the source of the installation of MySQL, always feel that the source code is tall on the matter, but the source code also need time, especially when make, if the disk and the CPU is poor, the time is very long, in the virtual machine
Usually we will use the MySQL client program to connect to the MySQL library, this is usually working in interactive mode, such as we connect to MySQL and do the following:mysql-uroot-h127.0.0.1-P3306welcome to the MySQL Monitor. Commands End With;
It is often necessary to periodically delete historical data from certain tables, which are often very large, and in order to mitigate the impact on the online environment, they must be deleted in small batches.Previously shared version of SQL
Understanding and operations of MySQL database transactions, mysql database transactions
A transaction is a series of operations performed as a single logical unit of work. These operations are submitted to the system as a whole, either executed or
I often talk about the usage of MYSQL pattern matching REGEXP and like, mysqlregexp
Like
LikeThe whole data must be matched, while REGEXP only needs to be partially matched.That is to say, to use Like, all content of this field must meet the
Solution for forgetting the Mysql root User Password on Mac, mysqlroot
I haven't gotten the mysql on my computer for a long time, and I forgot my password. But it doesn't matter. We can reset our password.
The principle is to enable the mysql
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