SHOW STATUSLog on to MySQL directly under the command line to run the show status command. The query statement is as follows: The same statement also has show variables; and show status is used to view the MySQL running STATUS, which is similar to
1.Convert the number of a character to a number. For example, convert '0' to 0, which can be directly implemented by addition.For example, sort d in the pony table and define d as varchar.Select * from pony order by (d + 0)2. when performing ifnull
Mysql_fetch_array-- Get a row from the result set as an associated array or number array, or both
Description: array mysql_fetch_array (resource result [, int result_type])
Returns the array generated based on the rows obtained from the result set.
Copy codeThe Code is as follows:#/Bin/sh# Check whether mysql server provides services normallyMysqladmin-u sky-ppwd-h localhost ping# Obtain the Current Status values of mysqlMysqladmin-u sky-ppwd-h localhost status# Obtain the current connection
1. Each client connection is divided into a thread belonging to the server process. The corresponding queries of the connection are all processed by this thread.
2. The Server caches the thread. Therefore, no threads are created or destroyed for
MySQL master/Master synchronization Configuration
Server Name
IP
System
MySQL
Odd.example.com
192.168.1.116
Rhel-5.8
5.5.16
Even.example.com
192.168.1.115
Rhel-5.8
5.5.16
Assume that the
Mysql:Select count (*) from main_index;
However, a syntax error is reported here.
Method 1:Check the document as follows:Aggregate functions (AVG (), MIN (), MAX (), SUM () in column list clause are supported. arguments to aggregate functions can be
1. if many rows are inserted from the same client at the same time, use the INSERT statement containing multiple values to INSERT several rows at the same time. This is faster than using a single-row INSERT Statement (several times faster in some
MySQLTuner: http://github.com/rackerhacker/MySQLTuner-perl
MySQLTuner usage:Downloading and using MySQLTuner is actually a very simple process:
Wget mysqltuner. plPerl mysqltuner. pl
If you 'd rather not invoke perl every time, just make it
This is the case: there are two tables, team table and people table. Each people belongs to a team and there is a field team_id in people.
The following table creation statement is provided:
Copy codeThe Code is as follows:Create table t_team(Id int
Cause:Group Buying development report indicates an error occurred during the update.Update the SQL statement as follows::Copy codeThe Code is as follows:UPDATE table_name d SET d. column_name = 'hangzhou'WHERE d. ID = 100976; The error message is as
The development environment of a company is usually deployed on the Intranet, and then there will be public servers for developers and tests. Therefore, there is often a need to connect to the server through ssh or a local mysql client, in my
MySQL 5.6 will automatically hide the password information in the log. This is not just obfuscation, and then stores the unidirectional hash value in the log file. You can disable Password Hiding for log files by setting log-raw = OFF. The log-raw
After the MySQL database receives a network connection, it first obtains the IP address of the other party, and then performs reverse DNS resolution on the IP address to obtain the host name corresponding to the IP address. Use the host name in the
The default encoding of the mysql database is not UTF-8.
After installing mysql, start the service and log on to the mysql database. Run the show variables command to view the default encoding of the mysql database:
The character set of the
I. concept:① Database Synchronization (master-slave synchronization-write data to the slave server while writing data to the master database)② Database Synchronization (master-master synchronization-two database servers write data to each other)
Ii.
1. How to solve the problem of slow import of large batches of disordered data into InnoDB?Because of the primary key clustered index relationship, InnoDB is slower and slower to import without a primary key or non-sequence primary key. How can we
1. view the current character set:
Copy codeThe Code is as follows:Show character set;
2. Delete mysql related directories
Copy codeThe Code is as follows:Rm-rf/usr/local/mysql/* installation directoryRm-rf/var/lib/mysql database directory
3.
1. InstallationCopy codeThe Code is as follows:./Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-ssl
Apache now has a pseudo-static function called built-in pseudo-static.
2. If there is no -- enable-rewrite
Mysql is often used in the development process to export and import Chinese tables. This article will detail how to use it. If you need it, refer1. Export data for utf8 first:(1) Export all tables of the source database:Copy codeThe Code is as
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