MySQL database table self-increment primary key ID is messed up and needs reordering.Principle: Delete the original self-increment ID and re-establish the new self-increment ID.1. Delete the original primary key:ALTER TABLE DROP ' id ';2. Add a new
command: show Processlist;if it is the root account, you can see the current connection for all users. If you are a normal account, you can only see the connection you are occupying. show Processlist; only the first 100 are listed, if you want to
1. First download the Windows edition to http://dev.mysql.com/, Mysqlinstall, this software MySQL provides the software for installing the solution for the Windows platform. 2. Copy the My-default.ini under MySQL and create the My.ini in the same
The first is to create the viewCREATE algorithm=undefined definer= ' root ' @ ' localhost ' SQL SECURITY definerVIEW ' New_view 'As (select ' Girls ') ' id ' as ' id ', ' Girls '. ' Name ' as ' name ', ' Girls '. ' Age ' as ' age ', ' girls ', '
Optimization steps:1. See if SQL can be optimized.2. See if the index can be optimized.3. See if the table structure can be optimized.Show table status from databases like ' tablename% '; View the capacity, index, and size of a data file for a
First, the basic operation#mysql-H localhost-u root-p;//link MySQL#mysql-u root-p password 123456;//Modify the root user password to 123456>show databases;//View data exists>create database db1;//Creating the Databases DB1>use db1;//into the
The INFORMATION_SCHEMA database is a MySQL-band that provides a way to access database metadata. What is meta data? Metadata is data about the data, such as the database name or table name, the data type of the column, or access permissions. Some of
Log as a means of important query problems, so try to record their own needs of the log, for their own query some problems.MySQL has the following types of logs:Error log:-log-errQuery log:-logSlow query log:-log-slow-queriesUpdate
Installation:CentOS 7 's Yum source does not appear to be properly installed when MySQL mysql-sever file, need to go to the official Web download ( by installing the Yum Source address, and then install MySQL via yum)Note: Before installing, you
First look at the problem."INSERT into Tg_article (Tg_username,Tg_type,Tg_title,Tg_content,Tg_date)VALUES (' {$_clean[' username '} ',' {$_clean[' type '} ',' {$_clean[' title '} ',' {$_clean[' content '} ',Now ())"People will find that the party to
Source after installing MySQL, the first time to start, often encounter can not update the PID file problems.There are several reasons for this:1. The service was not closed before. (if MySQL has been installed before, source installation directly
Today installs MySQL to install according to this ①http://www.cnblogs.com/zhuyp1015/p/3561470.html, but appears this problemUninstall again from the installation or there is a problem,Searched for a long time in StackOverflow found a
Installed MySQL Server 6.0, the login is always prompt: 1045-access denied for the user ' like ' @ ' localhost ' (using Password:yes), on-line search for a half-day final Solution, special records the solution:First step: Stop the MySQL service;The
MySQL command to import and export data table records (select load data)
MySQL Database Import and Export commands commonly use mysqldump source commands. This article shares a different and more convenient way to import and export data.
(1) Export
Use SQL statements to operate MYSQL character encoding-- View All character codes
Show character set;
-- View the commands for creating a database and the encoding used by the databaseShow create database dbtest;
-- View the database encoding:
Show
Analyze Mysql InnoDB Indexes
Abstract:
This article introduces the InnoDB Index-related knowledge of Mysql, from various trees to the indexing principle to the details of storage.
InnoDB is the default storage engine of Mysql (MyISAM before Mysql5.5.
Configuration steps for mysql dual-machine hot standby
Set dual-machine Hot Standby:
First, you must create a synchronization user on the two machines:
Grant replication slave on *. * to 'repdcs '@ '192. 168.21.39' identified by '123 ';Grant all
MySQL trigger LearningTrigger: a special type of thing that can monitor certain data operations and trigger related operations (insert, update, and delete). Some data changes in the table, it is expected that other data changes may occur at the same
How to enable, disable, and view functions of a MySQL database.
When MySQL is applied, you may encounter a situation where you cannot create a function. The following error message is displayed:
Copy codeThe Code is as follows:ERROR 1418: This
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