1. Create a new project named MySQL, programming environment Select C #, and then select Windows Forms Application, create a new form to display the datasets queried to the SQL database2. Drag a button and DataGridView control from the toolbox to
Four types of Key:primary key, Unique key, key, and Foreign key.1. If key is empty, then the column value can be duplicated, indicating that the column has no index, or is a non-leading column of a non-unique composite index2. If key is a PRI, then
The concept of an indexAn index is a special kind of file (an index on a InnoDB data table is an integral part of a table space), and they contain reference pointers to all records in the datasheet. More generally, the database index is like a
If there is too much data in the table, it will affect the efficiency of the query, then we need to find a way to optimize the query, usually adding an index is one of our choices;1. Add primary key (primary key index)Mysql>alter TABLE ' table_name '
Scripting idea: Remotely backing up the main library data from the library, and then recovering the data from the library, starting from the library.Environment: CentOS6.5 has installed MySQL multi-instance with Port 3306, 3307.The two instance is
I like the history of its function, the execution of the operation of the corresponding statements are output, some troublesome statements with the GUI operation, but also to save the corresponding SQL statement.Not bad!Official website:
1, download the MySQL tar package from the network, I downloaded the version of 5.6, as follows: mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz2, upload to Ubuntu, directly copy or use the tool can be, in my user imx under the download.3, copy the mysql-5
One, cross-linking: Do the Cartesian product of the table and the table, the keyword is crossjoin, is the least used in the entire cross-linking, but also the concept of the most importantTwo, internal connection
keyword:inner join, where
When I recently batched the data, I suddenly thought: Why not use stored procedures for data batching?Why do batches need to be processed?Self-answer: Reduce the number of database connections, improve efficiency.Advantages of Stored Procedure batch
SQL itself is not complicated, and I actually feel that deploying MySQL is the most complex environment.The centos6.5 system is used here to deploy the environment.First you need to install the database and database development environment, as well
One: Connect MySQLAbout MySQL download and installation I won't say it here, the first step is to connect our MySQL server, open the cmd command to switch to the bin directory where you installed MySQL server, and then enter Mysql-h localhost-u root-
Database version: 5.6.*1.row Log Image TypeThe parameter binlog_row_image controls the image type, which defaults to full (log all columns), which is the record before&after images.There are two other types of parameters, minimal and noblob,minimal,
Os:redhat As4Master:mysql 4.0.23Slave:mysql 5.0.37The error message in the slave log is as follows:Slaves from the master ' xxx.xxx.xxx:3306 ', user ' rep ' got theFollowing error: ' Access denied. You need the REPLICATION SLAVEPrivilege for this
The reason for this problem is not imported MySQL connection library, I downloaded from the official website after the online tutorial a variety of import without fruit, and finally found that I imported the wrong file ....Official web down the
To prevent SQL injection, here are a few important points to note:
1. Never trust the user's input. The user's input can be verified by regular expressions, or by limiting the length, by converting the single quotation mark and the double "-".
MySQL database using command-line Backup | MySQL Database backup commandFor example:Database address: 127.0.0.1Database user name: rootDatabase Password: PassDatabase name: MyWebBack up the database to the D disk and directory
MySQL: Execution Plan, mysql execution plan
MySQL execution plan
It is an effective way to view the execution plan during SQL optimization.1. Explain syntax
Explain select ...... Variant: 1. explain extended select ...... Decompile the execution
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