First, the main application of MySQL scenario 1, Web site system
2. Logging System
3. Data Warehouse System
4. Embedded system
Second, the MySQL frame composition:
Three, MySQL storage engine overview
1) MyISAM Storage Engine
The table for
After you get the demand, you will find that the MySQL database for both sites cannot be accessed remotely (security first). Then I think of the usual use of CSV file bulk input data. So
Try importing the export using CSV.
The import framework is
/** * Class Description: The MySQL database operation class * * using System;
Using System.Data;
Using MySql.Data.MySqlClient;
namespace Niunan.BYLW.Utility {/// operations class for MySQL database////// public class Mysqlhelper {
PRIVATE
A few days ago wrote a MySQL cross table update of a summary, today we look at the cross table delete.
After Mysql4.0, MySQL begins to support the cross table delete.
MySQL can delete multiple table records in one SQL statement, or you can delete
A relational database relies on a primary key, which is the cornerstone of the physical schema of the database. Primary keys are only available on a physical level for two purposes:
Uniquely identifies a row.
As an object that can be referenced
The memory table is a table in memory, the size of the memory used can be specified by the max_heap_table_size in my.cnf, such as max_heap_table_size=1024m, the memory table is not the same as the temporary table, the temporary table is stored in
Search Sub Domain
For example, search jb51.net will www.jb51.net, jb51.net, host.jb51.net, etc. are searched out.
If the use of MySQL with like words efficiency is very low, millions of or even tens of millions of data that is no way to use, so
MySQL defaults to a root user, but this user permission is too large, usually only in the management of the database to use. If you are connecting to a MySQL database in your project, it is recommended that you create a new user with a small
1, where the query conditions in the sentence is not equal to the number (where column!= ...) ), MySQL will not be able to use the index
2. Similarly, if a function is used in the query condition of the WHERE clause (for example, where day (column) =
Primary key
ALTER TABLE tablename Add new_field_id Int (5) UNSIGNED DEFAULT 0 not NULL anto_increment,add PRIMARY KEY (new_field_id);
Add a new column
Mysql>alter TABLE tablename ADD fieldname FieldType
Such as:
ALTER TABLE T2 ADD D
MySQL password expired, today encountered a connection to MySQL, always connected not up,
Error Symptom 1:
An attempt by a client to checkout a Connection has timed out
The first time a connection timeout error occurred, the first reaction is to
Reference table
Count () The number of bars used to count records
Copy Code code as follows:
Mysql> Select COUNT (*) from score;
Mysql> Select COUNT (*) from score where stu_id=901;
SUM () Sum function
Copy Code
Our most commonly used Dbd::mysql module, I found is a lot of people in the place. Because the installation always fails, I will introduce the solution, such as I use CPANM installation, sometimes out of/home/nue2501j/work/dbd-mysql-4.010/blib /arch/
Character-type data
Character data can be implemented with a fixed length or variable length string, which differs in that a fixed string of strings is filled with spaces to the right to ensure that the same number of bytes is used; variable-length
Creating triggersCreate a trigger with only one execution statement
Copy Code code as follows:
CREATE TRIGGER Trigger Name before| After Trigger event
On table name for each ROW EXECUTE statement
Where the trigger name
A subquery is nested within another query statement by nesting a query statement
Query results for inner query statements that provide query conditions for outer query statements
Because in a particular case, the condition of one query statement
Show the existing database by showing
Syntactic:
Show DATABASES [like Wild]
If you use the like wild section, the wild string can be a string that uses the SQL "%" and "_" wildcard characters.
Features: Show databases lists the
To access a MySQL server, you need to log in with a user account to proceed. Each MySQL user account has a number of properties associated with it, such as user name, password, and permissions and resource restrictions. "Permissions" defines what a
In fact, these two are different, last_insert_id () can return the bigint value of the ID. Instead, MYSQL_INSERT_ID returns an int. If you
The ID is unsigned int, or bigint. Well, it may be wrong to return it. Instead, use LAST_INSERT_ID () instead.
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