MySQL is a powerful open-source database. With more and more database-driven applications, people have been pushing MySQL to its limits. Here are 101 tips for adjusting and optimizing MySQL installation. Some of the techniques are specific to the
Sometimes we need to uninstall MySQL and reinstall it for a variety of reasons, but because uninstallation does not completely cause a variety of problems during installation. So uninstall completely when uninstalling. A step that is completely
Yesterday the basic system was deployed on the server, everything is OK .However, the developer to remote access to the MySQL database on the server, found that root remote connection is not, prompting the error :"1045-access denied for user [email
MySQL can use its own profile function to see what system resources are required to execute the statement, such as CPU, memory, disk IO, the default is the shutdown state to be manually opened, profile for the management or development of the DBA is
The building of a table is actually the process of declaring a column, building a table statement: The Create Tables table name (column name 1 column Type column property default value, column Name 2 column type column property default value, Index
1. Several ways to log in to MySQL:#mysql-uroot-p123456 to log in using the socket connection;View Socket file Location Ps-aux | grep mysqld[[Email protected] ~]# PS aux |grep mysqldroot 941 0.0 0.1 6268 1416? S 21:01 0:00/bin/sh/usr/local/mysql/bin/
Problem: MySQL statement using the% (percent semicolon) after like is not the more efficient the slower it runs!Total Time: 0.0489 sec 0.0691 0.0485 0.0467SELECT ' Goods_name ', ' goods_img ', ' sku_id ', ' import ' from ' goods ' WHERE ' goods_name
How to reset the MySQL password
If the password is known, it is modified by the following way;
[email protected]:~$ mysql --user=root--pass mysql
Enter Password:
MySQL> Update user set password=Password (' New-password-here ')
MySQL Common Export Data command:1.mysql exporting the entire databasemysqldump-u[user Name]-p [Database name]> [file name].sqlTo illustrate:Mysqldump-uroot-p salemanage> D:salemanage.sql2.mysql Export Database A tablemysqldump-u[user Name]-p
Please state the source:This article is a record of some of the commands and operations used by people to use MySQL under the CentOS system.1 Check that you have installed MySQL#rpm –qa | grep MySQL2 Check mysqld whether the service is turned
--Loop loops CREATE PROCEDURE ' test '. ' New_procedure ' () begin--need to define a variable that receives cursor data DECLARE a CHAR (+); --Cursor DECLARE cur cursor for SELECT i from test.t; --Traversal data end flag DECLARE done INT
You may encounter two problems when you update large amounts of data:
If each update executes a SQL performance is low, it is also prone to blocking;
There may be problems with primary key duplication when you batch update
Use on
Usually, webmasters do not have their own servers, every day to manually back up the database that is also very troublesome. A method is recommended to take advantage of Windows's scheduled tasks.premise : The MySQL service is installed on the local
MySQL multi-instance for semi-synchronous replicationMySQL multi-instance for semi-synchronous replicationMain Library 1:192.168.40.150Main Library 2:192.168.40.161From a library (2 MySQL instances): 192.168.40.162One: Use "Show Master Status" in 192
Restrictions of mysql5.6Limits in MySQL 5.6Sql Join restrictions:
Database and table quantity limit:
The table size of a Mysql database is generally determined by the size limit of a single file in the operating system, not by the mysql
Some optimizations that MySQL can make when the association is complex.
Yesterday, an optimization of complex associated SQL statements was processed. The optimization of such SQL statements usually takes into account the following four points:
1.
Four Methods for killing MySQL connections in batches and four methods for mysql
Method 1Use the connection information in the information_schema.processlist table to generate a temporary MySQL connection statement file to be processed, and then
Summary of examples of adding, deleting, querying, modifying, and using MySQL
1. Create a column
alter table tablename add colname type not null default '0′;
Example:
alter table mmanapp_mmanmedia add appid_id integer not null default 372;
2.
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