Parse the information_schema database of MySQL

The information_schema database is generated after mysql 5.0. A virtual database does not exist physically.The information_schema database is similar to the "Data Dictionary" and provides a way to access database metadata, that is, Data. For example,

Parsing mysql database restoration Error: (mysql Error Code: 1005 errno 121)

The reason is that the primary key must be unique, that is, there may be duplicates in the database with the current restored database. a restriction that Foreign Keys shoshould be uniquely named throughout the database, an effective method is to

Correct understanding of column indexes and multi-column indexes in Mysql

The Mysql database provides two types of indexes. If they are not correctly set, the index utilization efficiency will be greatly reduced, but the problem is completely unknown.Copy codeThe Code is as follows:Create table test (Id int not

Solution to 1418 error when creating a function in mysql

Copy codeThe Code is as follows:Error Code: 1418This function has none of DETERMINISTIC, no SQL, or reads SQL DATA in its declaration and binary logging is enabled (you * might * want to use the less safe log_bin_trust_function_creators variable)(0

Parsing mysql: removing duplicate records for single-Table distinct and multi-Table group by queries

Unique query for a single table: distinctUnique query for multiple tables: groupWhen distinct queries multiple tables, left join is still valid and full join is invalid,When using mysql, you sometimes need to query records with unique fields.

For MySQL Left JOIN, specify the NULL column to return specific values

The coalesce function can accept multiple parameters and returns the first non-NULL value of these parameters. If all the provided parameters are NULL, NULL is returned.The ifnull function is the same as the coalesce function, but only two

In-depth understanding of four SQL connections-left Outer Join, right Outer Join, inner join, and full join

1. Inner join(Typical join operations use comparison operators such as = or <> ). Including equal join and natural join.The inner join uses the comparison operator to match rows in two tables based on the values of the columns in each table. For

Mysql basics: Detailed description of mysqld_safe startup Execution Process

The basic process of mysqld_safe script execution:1. Search for basedir and ledir.2. Search for datadir and my. cnf.3. Check my. cnf. For details about the options, see the annotations in the attachment.4. parse the groups [mysqld] and [mysqld_safe]

Parse the delay-insert option of mysqldump

If you use delayed-insert to insert data, you do not need to lock the table../Bin/mysqldump-uroot-proot -- lock-tables -- extended-insert -- opt -- quick -- master-data test>/home/zhanghong/opdir/tmp/test. SQL--Lock tables 'student 'WRITE;/*! 40000

Brief summary of Mysql backup and recovery and tee command usage

Backup Data method:I. SQL statements.Locks tables tablename READ; // READ lockBefore trying to LOCK a table, lock tables is not TRANSACTION-safe. It implicitly commits all active transactions and starts a TRANSACTION implicitly (for example, start

Detailed introduction to mysql table Merging

The creation and merging of mysql tables is similar to that of partition tables. It is a feature of mysql that combines multiple myisam tables with the same structure into a virtual table. The surviving engine must be merge, the query from a merged

In-depth explanation of mysql YEAR () MONTH () DAYOFMONTH () Date function

Mysql date function. The current date in the example:Curdate () is June 24, 2013.YEAR (): displays YEARMysql> select year (curdate (); + ----------------- + | year (curdate () | + ----------------- + | 2013 | + ----------------- + 1 row in set (0.01

Streamline mysql processes (delete some files)

I saw a buddy write a tutorial and record it. I am ready to lose weight at any time.1. Delete the mysql-test folder; 2. Delete the SQL-test folder;3. Delete the debug folder under the bin directory;4. Delete all files with the. pdb extension in the

In-depth analysis of mysql Integer Data Types

In this example, the int char is not given their width, and the system will assign a width to it by default.M indicates the maximum display width. The maximum valid display width is 255. The display width is irrelevant to the storage size or the

In-depth explanation of master-slave replication latency in mysql

When I interviewed mysqldba, I encountered a question: Describes the implementation principle of the msyql replication mechanism. How can I restore the database node of the slave with inconsistent data without stopping the mysql master

Parsing auto_increment in mysql

When I visited the Forum today, I found a seemingly simple problem, but it attracted wide attention:This is a very early interview question:A table contains an ID auto-incrementing primary key. After 17 records are inserted, records 15, 16, and 17

In-depth explanation of mysql foreign key Association issues

Today, I will continue reading the book "mysql database development" recommended by the instructor. I encountered a problem when I saw the foreign key association problem with the innodb database, in the book, you can modify the parent table and

Discussion: How to query the currently running SQL statements in MySQL

Run the status command to view the Slow queries item. If the value is greater than 0 for a long time, the query execution time is too long.Copy codeThe Code is as follows:Reference content is as follows:Mysql> status;--------------Mysql Ver 11.18

In-depth explanation of using parameters for table names in mysql stored procedures

BEGIN Declare date_str varchar (8 );Declare table_prefix varchar (20 );Set table_prefix = 'mail _ rare_visit _';Set date_str = DATE_FORMAT (CURRENT_DATE (), '% Y % m % D ');Set @ table_name = concat (table_prefix, date_str );Set @ s = concat

Six tips for MySQL database performance optimization

On the surface of the database table, there is an index and error prevention mechanism. However, a simple query takes a long time. Web applications may run well in the development environment, but are equally bad in the product environment. If you

Total Pages: 3233 1 .... 2749 2750 2751 2752 2753 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.