One, covering index
Indexing is an efficient way to find data, but MySQL can also use indexes to get data directly from columns so that you no longer need to read rows of data. If the leaf node of the index already contains the data to query, what
The newly installed MySQL is the default does not account for remote access permission, also can not external connection mysql. This is inconvenient for data that you want to remotely call MySQL. Let's look at how to set up a MySQL database that
There are 2 different ways to complete Mysql backups
1 using system commands to back up MySQL data copy directly
For example
/etc/init.d/mysqld stop
Tar cvfz/var/lib/mysql/mydb_backup.tar.gz/tmp
/etc/init.d/mysqld start
This method must first
1, download the following two installation packages from http://www.mysql.com/downloads/:
mysql-server-5.5.8-1.linux2.6.x86_64.rpm
mysql-client-5.5.8-1.linux2.6.x86_64.rpm
2, install the server package:
# RPM-IVH mysql-server-5.5.8-1.linux2.6.x86
Use the system crontab to execute the backup file regularly, save the backup result by date, and achieve the purpose of backup.
1, create the path to save the backup file/mysqldata
#mkdir/mysqldata
2. Create/usr/sbin/bakmysql files
Note: The content of this article involves modifying NTFS disk permissions and setting security policies, and make sure that you understand the possible consequences of the operation before you make any changes.
The permissions mentioned in this
When a disk overflow occurs, MySQL does the following things:
It checks every minute to see if there is enough space to write to the current line. If there is enough room, it continues as if something had happened.
Every 6 minutes it writes
By default, MySQL searches are case-insensitive (but some character sets are always case-sensitive, such as Czech). This means that if you use col_name like ' a% ' to search, you will get all the columns starting with a or a. If you intend to make
MySQL's garbled filesThis afternoon, the relocation server; the transfer data was killed. Since the data was upgraded to a newer version of MySQL, all the problems in the relocation process occurred.
Because the default character set used when
Installing MySQL is unsuccessful, typically because the server may have installed MySQL without a full uninstall.
If you encounter MySQL can not start the following situations: whether double-click mysqld.exe or use the command line, are not
We know that we can put a large number of records of MySQL big table according to the primary key, Time field, conditional field, etc. into several tables and even saved in several servers.
The only problem is that the query is cumbersome across
Multi-table operations
In a database, there may be multiple tables, all of which are interrelated. We continue to use the previous example. The table previously established contains some basic information about the employee, such as name, sex, date
1. Export the entire database
Mysqldump-u user name-p database name > exported file name
Mysqldump-u wcnc-p SMGP_APPS_WCNC > Wcnc.sql
2. Export a table
Mysqldump-u user name-P database name Table name > exported file name
Mysqldump-u wcnc-p
First, MySQL Introduction
MySQL is a small and smart database server software, for medium and small application system is very ideal. In addition to supporting standard ANSI SQL statements, and most importantly, it supports multiple platforms, and
Suppose the column X in table T has these latin1 column values:
Muffler Müller MX Systems MySQL
Suppose you use the following statement to get the column value:
SELECT X FROM T ORDER BY X COLLATE collation_name;
The results of column values that
MySQL's ODBC interface implementation is through the installation of MYODBC driver, this driver is cross-platform. If used under UNIX systems such as Linux, you need to first install IODBC these third-party ODBC standard support platforms.
Simple
I. Creating a stored Procedure
1. Basic grammar:
CREATE PROCEDURE Sp_name ()
Begin
.........
End
2. Parameter transfer
Two. Call the stored procedure
1. Basic syntax: Call Sp_name ()
Note: The stored procedure name must be followed by
MySQL 5.1 's Chinese support for an improvement, starting from MySQL 4.1 does not support Chinese path, file name problem solved.
See the following example
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
The first is how to check the efficiency of SQL.
1. Use of explain:
After you design SQL, you should use the explain command to check the SQL to see if you are using the index and whether there is a filesort, focusing on whether the number of rows
First, consider whether you really need to change the order of columns in the table. The core point of SQL is getting applications from the data storage format. You should always specify the order in which data is retrieved. In the 1th statement
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.