Backup BasicsCold (cold Backup): Need to shut down the MySQL service, read and write requests are not allowed in the state;Win Bei (warm backup): Service online, but only support read requests, do not allow write requests;Hot backup: The business is
Recently began to learn MySQL so the two days to learn a brief summary of the knowledge1.status displaying database information2. Data type:A. String:CHAR (m): fixed-length character with a maximum of 255 characters;varchar (m): variable-length
Data types are data characteristics of columns, stored procedure parameters, expressions, and local variables, which determine how data is stored and represent different informationType. The data types commonly used in MySQL include: numeric types,
=========================1. Creating databases and Tables=========================A total of 6 tables, Student information table, class information table, Teacher information table, curriculum, selection of curriculum, teachers schedule#班级信息表class,
First, data backup 1. Backup with mysqldump commandThe mysqldump command backs up the data in the database into a text file. The structure of the table and the data in the table are stored in the generated text file.The mysqldump command works very
(1) Call the Class.forName () method to load the appropriate database driver
Class.forName ("Com.mysql.jdbc.Driver");
(2) Call the Drivermanager.getconnection () method to obtain a connection object that represents an open connection
3.2MySQL Data types3.2.1 Data Types Overview3.2.2 Special column types in the table definition3.2.3 The default value for the specified column———————————————————————————————3.2.1 Data Types OverviewMySQL number types include integers, fixed-point
It should be known that the InnoDB Single-column index cannot exceed 767bytes, and a federated index has a limit of not more than 3072 length.
mysql> CREATE TABLE ' TB ' (
' A ' varchar (255) DEFAULT NULL,
' B ' varchar (255) DEFAULT
With the structure and characteristics of the page, it is necessary to implement the salvage work of the database page;In order to facilitate the common use of Windows and Linux, plan to make a C language console application, and try to use only
problem: Installing the MySQL server on Linux, using the Client connection times error message is: Error 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using password: YES) Workaround 1: 1. Login mysql: mysql -uroot -proot
Workaround: View/usr/lib/php/modules/(64-bit look at/usr/lib64/php/modules/) there is no mysql.so.Installation:php-mysql-5.1.6-20.el5.i386.rpmphp-pdo-5.1.6-20.el5.i386.rpmTo view the corresponding path: found the corresponding so fileAdd to
Query_cache_type How to use query cachingIn general, we will set the Query_cache_type to on, which should be on by defaultMySQL>SELECT@ @query_cache_type; + -- ------------------+ | @ @query_cache_type | + -- ------------------+ | on
Write in front:What is written below is just a description of the most recent installation, installed in the absence of MySQL in the system, and later written in a detailed and valuable document based on official documentationInstallation principle:
A. Command Actionsa) database Query Current connection:showprocesslist;&&show status;b) Database viewing status:status;c) view CPU usage:topd) Refresh report Memory usage:free–b–s5 Free command: Total: the total amount of physical memory.
First, the basic conceptThe mysql5.1 version begins with the introduction of the event concept. Event is not only a "time trigger", unlike the events triggered by the triggers, the event is similar to a Linux crontab scheduled task for time
MYSQL functions and mysql Functions
Here is a list of all important MySQL functions. An example is provided to illustrate each function.
MySQL Group By clause-MySQL group by statement and SQL aggregate function, used to Group result datasets using
The instance parses the MySQL stored procedure and the calling method of the stored procedure, and the mysql Stored Procedure
Mysql added the stored procedure function after 5.1. The stored procedure runs inside mysql and the statements have been
Explanation of MySQL performance parameters: Skip-External-Locking parameter introduction, mysqlskiplocking
MySQL configuration file my. cnf contains a line of skip-external-locking parameters by default, that is, "skip external lock ". According to
Prevent repeated mysql insert records.
There are many methods to prevent repeated inserts of records in mysql. ignore, Replace, and on duplicate key update are commonly used. Of course, we can also judge them in php.
Solution 1:Use the ignore
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