Monitoring MySQL DatabasesMonitoring a MySQL database requires the use of a JDBC driver. To enable sitescope to monitor a MySQL database:
Download the JDBC driver from http://www.mysql.com/downloads/api-jdbc.htmlUncompress the distribution
When you use mysqlce to export database scripts, an exception occurs if the database contains Chinese content.
Now, you can use mysqldump.exe to directly export the database script as follows:
Step one
Run cmd to open the ConsoleProgram
Step two
Mysql-5.1.37-NOINSTALL version configuration installation on Windows:
1. Download The mysql-noinstall-5.1.37-win32.zip package, decompress the package, and move the extracted file directory to the location where you want to install MySQL. I chose
1. Install and test the Apache package
1.1 install the Apache package
Sudo apt-Get install apache2
1.2. Start and test the Apache Environment
Sudo/etc/init. d/apache2 startVisit http: // localhost and you will see "It works!" on the
Install MySQL
Download:MySQL 5.5.28
Install MYSQL: Select 'custom' --> next --> specify the installation path --> next --> install (there is nothing to say about installation, mainly MySQL configuration)
On the installation completion page,
Session System Variables
Several system variables exist only as session variables. These cannot be setAt server startup but can be assigned values at runtime usingSetStatement (Statement t for those that are read only ).Most of them are not
Introduction: This is a detailed page for centos Yum to install Apache + PHP + MySQL. It introduces PHP, Linux, PHP, Apache, MySQL, knowledge, skills, experience, and some PHP Source Code related to installing Apache + PHP + MySql in lamp centos yum.
There has never been a systematic summary. Today I saw a more detailed answer on the Internet, so I recorded it.
InnoDB and MyISAM are the two most commonly used table types in MySQL, each with its own advantages and disadvantages, depending on
MySQL document: http://dev.mysql.com/doc/refman/5.0/en/dns.html
MySQL verifies the legality of a user by performing the following steps during user connection processing:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.
My previous database encoding is the default Latin1, but I want to convert it to utf8, Baidu, and Google for a long time. There are many methods, but many methods are either too troublesome or hard to understand.
After checking for half a day and
1. A simple example
1.1. Create a table:
Create Table T (S1 integer );
1.2. Trigger:
delimiter |create trigger t_trigger before insert on t for each row begin set @x = "hello trigger"; set NEW.s1 = 55;end; |
1.3. If a trigger creation error
Xtrabackup------ Necessary tools for MySQL DBA
Note:
1) Documents Reference http://www.percona.com/docs/wiki/percona-xtrabackup:start
2) mysql version 5.1.50 or later.
1. Introduction and installation of Xtrabackup
1. Xtrabackup is an open-source
After MYSQL exports an SQL statement:
DELIMITER $
Drop trigger if exists 'updateegopriceondelete' $
CREATE
TRIGGER 'updateegopriceondelete' after delete on 'mermerinfo'
FOR EACH ROW BEGIN
Delete from egoprice WHERE customerId = OLD. customerId;
END $
The first step is to prepare a database:
We need to set the binary field to the Blob type, and select the appropriate Blob type based on the file size. The following figure shows the size of each Blob type that can accommodate binary files.
Four
A beginner often asks me how to back up the database. The following describes three methods to back up the database:(1) Back up database files
Each database and data table in MySQL correspond to the directory in the file system and the files under
1./* + ALL_ROWS */It indicates that the overhead-based optimization method is selected for the statement block, and the optimal throughput is obtained to minimize the resource consumption.For example:SELECT/* + ALL + _ ROWS */EMP_NO, EMP_NAM, DAT_IN
There are several possible causes for serious performance problems:1. The index is not created;2. SQL statements are too complex;3. Configuration Error;4. The machine cannot be loaded;1. Index not createdIf you see that mysql consumes a lot of cpu,
If you want to run multiple servers, the easiest way is to recompile the server with different TCP/IP ports and socket files, so they do not listen on the same TCP/IP Port or socket.Assume that an existing server is configured as the default port
The best solution is to forget the mysql password. After testing, if the password fails, your mysql runs abnormally.Solution:In windows:Copy codeThe Code is as follows:Open the command line window and stop the mysql service:Net stop mysqlStart mysql,
1. Test Environment
OS: LinuxDB: mysql-5.5.18Table: innodb Storage Engine
The table is defined as follows:
2. test scenario and analysis [number of group_message records in the statistical table]
(1) select count (*) Method
(2) select count
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