MySQL's own Mysqlbinlog | MySQL rollback is not good for you to write a simple script to try:The idea is to use Mysqlbinlog to find the transaction area that needs to be rolled back from Mysql-bin.file and then insert the DB through the script.# #
Recently in the study of MySQL, of course, the first to install it on the machine. Record the operation, deepen the memory, also for later reference.Preparatory work:Linux version:Redhat Linux 6.4MySQL version (installation package):
1. Create a new Java project in eclipse2. Introduction of the JDBC Library (in the extenrnal of Bulid Path)3.1) Import SQL Package (import java.sql.*)2) load (register) MySQL JDBC driverClass.forName ("Com.mysql.jdbc.Driver");3) connection database (
groupadd MySQL #添加mysql组 useradd-G MySQL mysql-s/bin/false#创建用户mysql并加入到mysql组, MySQL users are not allowed to log in directly to the systemmkdir-p/data/MySQL #创建MySQL数据库存放目Chown-R mysql:mysql/data/MySQL #设置MySQL数据库目录权限mkdir-p/usr/local/MySQL
Error log: Log_error,log_warningsInformation in the server startup and shutdown processError message during server runEvent scheduling information that is generated when an event is runInformation generated from the server process when it is started
This mysql.sock should be MySQL host and client on the same host, use UNIX domain socket as the carrier of communication protocol, it is faster than TCP. The common cause of this problem is that your MySQL server is not running.There are two ways to
1. Download the JDBC Driver:http://dev.mysql.com/downloads/connector/j/2. Add the JDBC jar package to the project's Libs directory and build path2. Modify environment variables: Export Path=/usr/local/mysql/bin/:${path}3. Default [email protected]
1. First verify that the server is in a secure state, that is, no one can connect to the MySQL database arbitrarily.Because the MySQL database is completely password-protected during the reset of the root password of MySQLStatus, other users can
() WHERE clause operator= equals<> Not equal to! = does not equal> Greater than>= greater than or equal toBetween between the specified two valuesFor example:Find the student number from 0007 to 0009 (not including 0009)?select* from Student_info
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)Solve:1, first stop the MySQL service, the command is as follows:#/etc/init.d/mysql stop2, restart the service, the command is as follows:#/etc/init.d/mysql Stop#
Database performance is critical to a data-centric application that directly affects the performance of the program. In general, to ensure the efficiency of the database, to do the following four aspects of the work: database design, SQL statement
Friends who know mysql know that some problems will occur in the database after a long period of use, which requires quick repair and damage to the mysql database to facilitate our work and study. The following section describes two methods for
Start MySQL
1. initialization module execution & initial storage engine execution
2. After the execution is completed in step 1 ----> the connection management module takes over
3. The connection management module starts the listening program
Mysql update select usage example
Inner join should be used, I .e:
UPDATE friends inner join users ON friends. friendid = users. userid SET friends. friendname = users. username
MySQL uses a temporary table to implement nested queries in The FROM
I. First explain why Table sharding is required:When a piece of data reaches several millions, it takes more time for you to query it at a time. If there is a joint query, it may die there. The purpose of table sharding is to reduce the burden on
Mysql uses the WKB function to create Geometry (ry) Values
MySQL provides many functions that use BLOB containing WKT expressions or optional Spatial Reference System ID (SRID) as input parameters. They return corresponding geometric
Mysql database KEY partition usage
Partitioning by KEY is similar to partitioning by HASH. Except for the User-Defined expression used by HASH partition, the HASH function of KEY partition is provided by the MySQL server. MySQL Cluster uses the MD5
Scenario:Master database DB: utf8 Character SetSlave database DB: gbk character set
Requirements:Verify that the master and slave data are consistent and repair Verification process:Set the master database connection to utf8, set the slave database
Master Configuration:
The Code is as follows:
Log-bin = mysql-binServer-id = 1Binlog-do-db = powerdns # database to be synchronized
Add an slave account to the Master:
The Code is as follows:
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