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,
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
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
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
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.
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
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
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]
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
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
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
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
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 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
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
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
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
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
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
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