1. View MySQL log mysqlshowglobalvariableslike % log %; + ----------------------------------------- + ----------------------- + | Variable_name 1. View MySQL log
mysql> show global variables like '%log%';+-----------------------------------------+
PerconaToolkit2.2.9isnowavailable Percona is gglad to announce the release
Percona Toolkit2.2.9 on July 10,201 4
(Downloads are available here and from the Percona Software Repositories). This release is the current GA (Generally Available) stable
In SQLLimit usage, the first parameter in Limit is offset.
In MySQL, limit is used to retrieve data in order. Therefore, order by random () is used to obtain data randomly ();
Netezza: use the random () function
Select setseed (random ());
Select *
After MySQL is installed, only the following hosts are recognized: localhost and 127.0.0.1. After MySQL is installed, only the following hosts are recognized: localhost and 127.0.0.1, if you want to allow the IP address on your machine to log on
Use navicat to create a MySQL stored procedure Navicat
Procedure for creating a stored procedure using Navicat for MySQL:
1. create a function (select the function tag> Click create function ):
2. number, name, and type of parameters of the
MySQLFlush operation ----------------------------------------------------------------
If you want to clear some internal caches used by MySQL, you should use the FLUSH statement. To perform FLUSH, you must have the RELOAD permission.
UbuntuServer MySql database backup script code: UbuntuServerUbuntu
Ming:
Here I want to back up the pw85 database under the/var/lib/MySql database directory to the compressed file format of/home/snapshot (2012_04_11 refers to the date on which the
All myslq tables share a tablespace, causing the ibdata1 file to be too large. the database crashes bitsCN.com.
Mysql is used in linux. because the mysql price configuration is not completed at the beginning of the database creation, all tables use
Mysql Performance Optimization
1. optimize table
2. analyze table
3. try to declare the column as NOT NULL
4. Mysql only uses the prefix index to avoid creating an index on an existing index prefix.For example, do not create an index (a) on index
We have recently used tomcat and MySQL to build a Java Web Server and deploy the game server logic on it.
Shortly after the game was launched, we found a large number of garbled characters in the database. This is a very serious problem and must be
The connection between php and localhost is divided into two types: IP and unix sock, that is, localhost, it is better to use localhost, which is also convenient for later Management. if it is used to connect to a non-local database, it will pass
NOTE _ 2 wildcards in MySQL: (trailing spaces may interfere with wildcard matching)
% Match any character _ match any single character
Regular expression: REGEXP
The usage is to replace the LIKE position, followed by a regular expression.
Case
In windows, killing processes in batches sometimes starts a series of processes due to viruses or other reasons, and sometimes kills the processes and removes them. Run taskkill to kill all of these processes:
C:/Users/NR> taskkill/F/im
Analysis of table_cache configuration parameters for MySQL Performance Optimization table_cache is a very important MySQL performance parameter. it is called table_open_cache in versions later than 5.1.3. Table_cache is mainly used to set the number
In Windows and Linux, MySQL restores database code in Linux:
1. create an empty database cddl
Mysql> create database cddl;
Query OK, 1 row affected (0.00 sec)
2. restore the database
[Root @ chicago mysqlsoftware] # cd/etc/rc. d/init.
Tomcat connects to the mysql database Tomcat
Today, I tried to connect to the mysql database. after successful connection, I wrote something. after all, the road to growth is still long.
Welcome to xasasa
How to install multiple mysql databases under Centos5.2
1. Compile and install the first MySQL 5.1.33
cd /opt/usr/sbin/groupadd mysql/usr/sbin/useradd -g mysql mysql -s /bin/nologin -d /usr/local/mysqltar -zxvf mysql-5.1.33.tar.gzcd mysql-5.1.33
View mysql installation path in Linux
1. view the file installation path
Since there are more than one place for software installation, let's first check all the paths (addresses) for file installation ).
Mysql is used as an example. For
MySQL character set topic (character set, verification, garbled code)
1 MySQL character set overview
MySQL server supports multiple character sets. different character sets can be specified for different fields in the same server, database, or even
Summary on April 9, mysql's select function:
MAX (); returns the maximum value of this field
MIN (); returns the minimum value of this field
COUNT ();
Returns the number of rows in the database to a non-NULL value, count (*) returns the number
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