View MySQL database size with SQL commands

To know the size of each database, proceed as follows:1. Access to the INFORMATION_SCHEMA database (information on other databases)Use INFORMATION_SCHEMA;2, query the size of all data:Select Concat (Round (sum (data_length/1024/1024), 2), ' MB ') as

MySQL custom modify Data directory path

MySQL default directory in/usr/local/mysql/var, we will modify the directory to/data1. Stop MySQL#/etc/init.d/mysql Stop2. Edit the MySQL configuration file to change the path after DataDir to/data.Vi/etc/my.sql650) this.width=650; "src=" Http://s1.5

Non-root user installs, configures MySQL

1. Download MySQL, probably because the server operating system version is low (CentOS4.3), the installation of 5.7 prompts for Lib, just I do not need to install a new version, so downloaded 5.1 linux-generic (glibc 2.5) (x86, 64-bit), Compressed

MySQL Master-slave configuration

The role of replication:Secondary implementation BackupHighly AvailableRemote disaster recoveryScale out: Load sharingServer-id is important in replication.Master-Slave architecture, do not use the MySQL agent, how to let the master responsible for

MySQL uses if to judge

Select *,if (sva=1, "male", "female") as Ssva from Taname where sva<> ""12.2. Control process functionsCase value when [compare-value] and then result [when [compare-value] then result ...] [ELSE result] END case [condition] then result [when

PHP data access (for example, MySQL database)

Build a connection, create a Connection object$db = new Mysqli ("localhost", "root", "123", "MyDB");Judging if there is an error/*if (mysqli_connect_error ()) {echo "Connection failed! ";Exit}*/Mysqli_connect_error () Die ("Connection Failed"):

MySQL Execute SQL file

Mysql-uspider_55haitao-pspider_55haitao-dspider_55haitaomethod One executes with the cmd command (under Windows, UNIX or Linux under its console)"MySQL Bin directory" \mysql–u user name –p password –d database

Multi-Criteria Query (PHP+MYSQL) Rental House Example

area    domain: Select all query ($s);echo ""; foreach ($a as $v) {echo "{$v [2]} "; } echo ""; ?> House type: Select all "; foreach ($a as $v) {echo "{$v [5]} "; } echo ""; ?> Leasing Type: Select all

[formerly] share a MySQL profile running under a low-provisioned VPS

In a variety of memory CPU core only 1/2 cores, memory only 512m/1g VPS, memory, CPU, hard disk are not too abundant. So the main idea is to prohibit eating large memory InnoDB engine, the default use of MyISAM. It is forbidden to eat hard disk

MySQL Case cancellation sensitive settings

MySQL Case cancellation sensitive settings#mysqld--set-lower_case_table_names=1;Or add a configuration entry in the MySQL server configuration file:Vi/etc/my.cnfLower_case_table_names=1The value of the variable is defined in detail as follows:

MySQL performance optimization common tools

MySQL performance optimization common tools:Common Performance testing toolsShow Engine InnoDB StatusShow Full ProcesslistInformation_schema.processlistExplainCREATE TABLE Innodb_table_monitor (a int) engine=innodb;Innodb_locksInnodb_lock_waitInnodb_

MySQL list partition (reprint)

The list partition and the range partition are very similar, the main difference being that the list is a collection of enumerated value lists, and range is a continuous set of interval values. The two are very similar in terms of syntax. It is also

"MYSQL" Data type

Reprint Https://www.baidu.com/s?ie=UTF-8&wd=cnblogThe original tears Yunshan Hai blog MySQL data type1. Integral type MySQL data type Meaning (Signed) tinyint (m) 1 byte range ( -128~127) smallint (

Construction of the Wishing Wall website based on Apache+php+mysql in the CentOS system

1. In the first step, we prepare two virtual machines (centos7,linux text).2. Configure the network environment for two virtual machines in bridged mode CentOS7 IP is 192.168.100.139, 24,linux text IP is 192.168.100.239/24, and then each

MySQL JOIN Syntax description and illustration

First, MySQL JOIN classificationJOIN is broadly divided into three categories as follows:INNER join (inner JOIN): Gets the record that has a connection matching relationship in two tables.Left join: Gets the left table (table1) full record, that is,

Zabbix automatically discovers MySQL ports and monitors

First, demand:Because we are a game business, to use MySQL, a server running multiple MySQL instances is also very normal. Adding web monitoring is too time-consuming if you modify agent.conf manually on a single station. So just think about using

Single-instance and multi-instance installation of MySQL

Cd/daPrerequisites: Yum lib (yum install *)-bash (problem with environment variable) command not found (configuration file error)1. Build MySQL user useradd MySQL2. Create Data Catalog Mkdir-p/data/mysql4. Create profile directory/etc/my.cnf (upload

MySQL Grammar summary

Set the character encoding used by the SQL statement: set names UTF8;Determines whether the specified database exists: DROP db if EXISTS library;Start using the specified database: use library;Create database for creating databases;Create data table

CentOS Install MySQL

Uninstall the old version of MySQL first# See if the MySQL database is already installed on the operating system grep MySQL # execution result: mysql-libs-5.1. 3. el6_5.x86_64# Normal deletion may prompt that a dependent component cannot be

MySQL Slow log management

First, log cuttingPrinciple:1, CP a slow log backup2, clear the principle of slow log3, write a script, every day, so OKSecond, find the slow log in the log1, do a log cutting (slow log file is small)2. Find a slow log at a timeLog Time format: #

Total Pages: 3233 1 .... 1596 1597 1598 1599 1600 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.