1. Change the root passwordMysqladmin-uroot password ' yourpassword '2. Remote Login to MySQL serverMysql-uroot-p-h192.168.137.10-p33063. Querying the Databaseshow databases;4. Enter a databaseUse DatabaseName;5. List the tables in the databaseShow
1. Install client and server sideView CentOS comes with MySQL:Yum List Installed | grep MySQLUninstalling the CentOS system with the MySQL database?Yum-y Remove mysql-libs.x86_64Install the MySQL client and server:Yum-y install mysql-server MySQL
[Mysqldump]Max_allowed_packet = 512M[Mysqld]Interactive_timeout = 120Innodb_change_buffering=allInnodb_change_buffer_max_size=25# Innodb_buffer_pool_instances=1 change at your own
1. Querying dataFirst save from the simple come on, before we realized the database table information read into a list collection, the database query, realIs the query of this set;1 Public classShow {2 Public Static voidMain (string[] args) {3
First, the mathematical function abs (x) returns the absolute value of x bin (x) returns the binary of X (Oct returns octal, HEX returns hex) CEILING (x) returns the smallest integer value greater than x EXP (x) The X-square floor (x) of the return
MySQL database is a widely used relational database, its small size, multi-processor support, open source and free features make it in the Internet small and medium-sized web site usage is particularly high. In the process of using MySQL, irregular
Mysqlbinlogis what ?The following files are in the data directory: mysql-bin.xxxxxxfunction ?Record database internal additions and deletions to check MySQL database for updated content recordsthree different modes ?statement level mode: The
MySQL InnoDB supports three kinds of line locking methods:Row lock (Record Lock): The lock is added directly above the index record.Gap Lock: Locks are added to a nonexistent free space, which can be between two index records or the space after the
Environment : three machinesPrimary server: 192.168.1.130Main Standby machine: 192.168.1.131Monitoring machine: 192.168.1.132130 and 131, is MySQL dual master architecture1. Install the Mha4mysql-node on three machinesYum-y Install Perl-dbd-mysqlTAR-
Basic commandsDESC table name; query table structureShow columns from table name; query table resultsHaving the use, either out of the lookup field (select) or within the aggregation function (sum (); count ();.Limet 2,2: The result of the lookup is
MySQL Connection- - penter Password: ******The mysql> Command Prompt window will appear after successful login to The MySQL monitor....mysql >Create a database after logging inCREATE DATABASE IF not EXISTS DatabaseName;Deleting a databaseDROP
The InnoDB engine provides transactional security with commit, rollback, and crash resiliency, but the contrast MyISAM engine is less efficient and consumes more disk space and preserves data and indexes1. Auto-Grow columnThe auto-grow column of the
There is a concept of storage engine in MySQL and the optimal storage engine can be selected for different storage requirements.I. OverviewMySQL 5.0 supports storage engines including MyISAM, InnoDB, BDB, Memory, MERGE, EXAMPLE, NDB Cluster,
What is MDLMdl,meta data lock, a metadata lock, is generally called a dictionary lock. The dictionary lock corresponds to a data lock. Dictionary lock is to protect the data object is changed, usually some DDL will change the Dictionary object, such
SQL optimization,Optimization objectives
1. IO reduction is always the easiest bottleneck for databases. This is determined by the database's responsibilities. More than 90% of database operations are occupied by I/O operations, reducing the number
Basic statement for adding, deleting, modifying, and querying mysql, and basic statement for adding, deleting, and modifying mysql
Syntax
Here is the general SQL syntax for inserting data INTO a MySQL table using the INSERT INTO command:
INSERT INTO
Details about how to clear table space fragments in MySQL.
How to clear table space fragments in MySQL
Causes of fragmentation
(1) the storage of a table is fragmented. When a row of content is deleted, the space in the row is blank and left blank.
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