This article will introduce you to these unknown features.
View query results in XML format
By invoking the MySQL command-line client using the traditional-xml option, you can view the MySQL query results in XML format instead of the traditional
Sometimes need to rent space or database on the Internet, MySQL cost less, so want to turn SQL Server to MySQL ...
Note: When you install MySQL to select the text set for UTF8, otherwise you will not be able to use Chinese (you can also use UTF8
Gb2312,gbk,utf8, such as the support of multibyte-encoded character sets can store Chinese characters, gb2312 in the number of Chinese characters is far less than GBK, and GB2312,GBK can be encoded in the UTF8.
Two. Show variables like ' character\_
Use the MySQL database mysqldump tool, can realize the database backup function, if in the Linux system Configuration good crontabs, can realize the automatic backup!
#!/bin/bash
# #配置原数据库连接信息, that is, using a database machine that needs to be
Introduction to a Substring_index functionrole: intercept strings by keywordSubstring_index (Str,delim,count)Description: Substring_index (the number of occurrences of the intercepted field, keywords, keywords)Example: Select Substring_index ("she
MySQL the SQL There are many extensions, some of which are handy, but some have performance problems after being misused, and there are some unintended side effects, such as REPLACE into . MySQLwhen the data conflicts, it actually deletes the old
Click on the "Plus" icon to create a new connection,For example, first enter the database account password, account default is root, fill in the Password and click "OK", the connection is established, after the completion of the establishment, there
In the use of MySQL, often in the table to establish a self-increment ID field, the use of self-increment ID can be quickly indexed, is also the official MySQL recommended way, but this way in a large number of data and configuration of master-slave,
last_insert_idAutomatically returns the first occurrence of the last INSERT or UPDATE action set for the Auto_increment column. Refer hereThe ID is generated are maintained in the server on a per-connection basis.LAST_INSERT_ID is based on a single
Normally, a generic database password can be written in the user's home directory. MY.CNF then set chmod 600, which is generally more secure.But if you do not want to give people know the user name and the actual password, but also want to use, you
By default, MySQL cannot be accessed through a remote machine. The following configuration allows you to enable remote access.
On the MySQL server:
Run the MySQL command to enter the MySQL command mode,SQL code
Mysql> use MySQL;
Mysql> grant
# Etcinit. dmysqldstart start MySQL if you use this command for the first time, your varlibmysql will create a database. # Mysql-uroot initial
#/Etc/init. d/mysqld start MySQL if you use this command for the first time, your/var/lib/mysql database
In Ubuntu7.04, the following error will occur when using mysql-gui in the following version, which is my reference on the mysql official website, with the address of the following http://bugs.mysql.com/bug.php? Id = 28959. Here we provide a solution,
MySQL has powerful user-defined functions, as shown below. I wrote a MySQL function to determine whether the video address can be played on the mobile phone.
MySQL has powerful user-defined functions, as shown below. I wrote a MySQL function to
Case study time:
----------------------------------------------------------------------------------------------------------------------------
1 PRIMARY
Index (NULL) idx_gid 5 (NULL)
Using where
2
Index_subquery
Today, a student asked me if I could migrate the database. I thought I should have to re-create the table, but it is too inefficient and I still need to import many records from the table, so I thought that mysql bin provided two commands, mysqldump
MySQLAdministrator. For the rest of the time, I assume that you have installed MySQL Administrator and the related legends will be used.500) this. style. width = 500; "border = 0>MySQLAdministrator Main InterfaceCreate a databaseTo create a database,
1. Install mysql first,Feet House: http://www.jb51.net/softs/2193.html or go to mysql.com official website can, one way next, after installation, there is a simple configuration, prompt to have a set login password and service name,The default value
Common functions used to query time periods using MySQL timestamps
Unix_timestamp (date)
If no parameter is called, a Unix timestamp (in seconds starting from '2017-01-01 00:00:00 'GMT) is returned ). If unix_timestamp () is called with a date
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.