Sometimes, you want to drop some records or change their contents. The DELETE and UPDATE statements enable us to do this.
Modify records with update
UPDATE Tbl_name Set the column to change
The record WHERE you want to update
The WHERE clause
Convert () provides a way to convert data between different character sets. The syntax is:
CONVERT(expr USING transcoding_name)
In MySQL, the conversion code name is the same as the corresponding character set name.
Example:
SELECT
System and Software versions:
CentOS Release 5.5 x86_64
Vsftpd-2.0.5-28.el5
Mysql-server-5.0.95-3.el5
PAM_MYSQL-0.7RC1.TAR.GZ Compilation Installation
Previously written vsftpd+tls+mysql solution, always unable to log into the FTP server
First, Xtrabackup Simple overview:
Percona Xtrabackup is open source free MySQL database hot backup software, it can innodb and XTRADB storage Engine database non-blocking backup (for MyISAM backup also need to add table lock). Xtrabackup supports
The log files described here are files of the MySQL database itself, regardless of what storage engine is specifically used.
Error log
MySQL's error log is similar to Oracle's Alert.log, which ends with. Err by default, and the DBA should first
Mysqlbinlog
The tool that reads statements from the binary log. Logs of executed statements contained in a binary log file can be used to help recover from a crash.
MySQL database log, there are the following kinds of logs:
1. Error
The creation of libraries, tables, and query statements in MySQL is very helpful for us to use the database in the future, this article is a summary of these basic statements, I hope it will help you
1. Create and delete databases
Creating a
Environment Introduction:
Use Yum to install a MySQL, because the version does not meet the requirements, the use of RPM uninstall, and the use of RPM installed a version of MySQL.
Error alert:
After MySQL installation, error log errors:
[ERROR]
Because the character set cannot be defined when a parameter is defined in a stored procedure, when a stored procedure is invoked, the global variable character_set_server is read by default, and the value of the global variable is read only at
MySQL automatic backup is critical, especially for DBAs. Here the main use of code to illustrate this issue, I hope to help you. You can put this script into the crontab, perform it once every morning, and automatically back up.
This script
1 --########## 01, database Overview ##########2 --1, information: All kinds of things that can be touched in the real world3 --2, data: Mapping of information in the computer World (reflection)4 5 --in Java, data can be stored in various containers
Installation completed the MySQL service error when initializing the database[[email protected] mysql]# /application/mysql/bin/mysql_ Install_db --basedir=/application/mysql/ --datadir=/application/mysql/data/ --user=mysqlfatal
1. Inserting a record insertCommand:, expr: ExpressionNote: If you assign a value to a primary key (an AutoNumber field), you can assign a value of ' NULL ' or ' default ', the value of the primary key will still follow the default rule, and if you
Why we cannot perform a ALTER TABLE directly to update schema?How MySQL performs ALTER TABLE:
Lock the table
Make a copy of the table
Modify the copy (the "New Table")
Copy all the rows into the new table
Swap the old and
Reference Address: http://dev.mysql.com/doc/refman/5.6/en/partitioning.htmlWhen to use partitions
Massive data
Data table index is larger than server valid memory
Restrictions on partitioning
Most of the data table's
To create a MySQL user, group:# Groupadd MySQL# Useradd Mysql-m-s/sbin/nologinTo start a compilation installation:# CD mysql-5.6.28#./configure \--prefix=/application/mysql5.6.28 \ #指定路径--with-unix-socket-path=/application/mysql5.6.28/tmp/mysql.sock
The difference between IN and exists IN SQL statements and the application of inexists IN SQL statementsTable display
First, the query involves two tables, one user and one order table. The specific table content is as follows:
User
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