MySQL binlog3 type format, row,mixed,statement. Parsing work
Mysqlbinlog--base64-output=decode-rows-v mysql-bin.000144 |more
--base64-output=decode-rows: Shows the SQL changes brought by the row mode.
-V: Shows the SQL statement brought by the
Method 1: Using the Set password command
Copy Code code as follows:
Mysql-u Root
mysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass ');
Method 2: With Mysqladmin
Copy Code code as follows:
Before the Server Configuration Test service environment, I lazy easy to use the online ready-made script to install, the result of MySQL can not start, so I only honestly reinstall MySQL Server, originally thought Apt-get--purge this kind of
Databases are IO-intensive applications whose primary responsibility is data management and storage. And we know that the time to read a database from memory is a microsecond level, while reading an IO from a common hard disk is at a millisecond
The MySQL database can use triggers to make it impossible to modify the data in some fields without affecting other fields being modified.
DROP TRIGGER IF EXISTS ' members ';
SET @OLD_SQL_MODE =@ @SQL_MODE, sql_mode= ';
DELIMITER//
CREATE
Following the normal steps to install MySQL, the default directory for DataDir found is
Copy Code code as follows:
C:\Documents and Settings\All Users\Application Data\mysql\mysql Server 5.1\data
Originally C disk capacity is not
In general, the cause of MySQL appears in Chinese garbled factors mainly have the following points:
1.server itself set up problems with the character set, for example still stay in Latin12.table language setting problem (including character and
All of the following runs through the MySQL 5.5 command line:
To view MySQL-supported character sets:
Copy Code code as follows:
Show CharSet;
View Character Set:
Copy Code code as follows:
Status
The following
In a database table, indexing a field can greatly improve the query speed. If we create a mytable table:
Copy Code code as follows:
CREATE TABLE mytable (ID INT NOT NULL, username VARCHAR is not null);
We randomly inserted 10,000
Copy Code code as follows:
CREATE definer= ' root ' @ ' localhost ' PROCEDURE ' createbusiness ' (parameter1 int)
BEGIN
#Routine body goes ...
DECLARE flag int DEFAULT parameter1; #声明变量flag, assign a parameter value to the variable
DECLARE
If the MySQL server has binary logging enabled, you can use the Mysqlbinlog tool to recover data starting at a specified point in time (for example, from your last backup) until now or another specified point in time. "Mysqlbinlog: Utility for
Many developers will meet the "Mysql:error 1040:too many Connections" exception, which is caused by a high volume of traffic, MySQL server can not withstand, this time to consider increasing the spread from the server read pressure Another reason is
Requirements: Copy one of the field contents of a table to a field in another table.
Implementing SQL Statement 1:
Copy Code code as follows:
UPDATE File_manager_folder F1
Left OUTER JOIN file_manager_folder F2
On f1.name =
In MySQL, a transaction is a series of steps for a logical unit of work. Transactions are used to ensure the security of data operations.
Characteristics of the transaction:
1.Atomicity (Atomic)2.Consistency (stability, consistency)3.Isolation
You can use SQL to achieve the same functionality, which is a bit of a hassle.
drop table T1;
drop table T2;
CREATE TABLE t1 (ID int primary key,nickname varchar (), playnum varchar);
CREATE TABLE t2 (ID int primary key,nickname varchar
In the Apache, PHP, MySQL architecture, MySQL has the greatest impact on performance and the key core. For the discuz! Forum program is also the case, MySQL settings are reasonable optimization, directly affect the speed and load of the forum! At
The entire process used by the MySQL cursor is:
1. Creating Cursors
Copy Code code as follows:
DECLARE Calc_bonus CURSOR for SELECT IDs, salary, commission from employees;
2. Open cursor
Copy Code code as follows:
1. Use of arrays in PHP
Using associative arrays (associatively-indexed arrays) is very helpful when manipulating a database, so let's look at an array traversal of the basic number format:
Copy Code code as follows:
$temp [0] =
Studied a bit ~ method a lot ~ finally decided to import with Excel ~ in the online search a lot of this information, found that the Excel file is saved as a CSV file, and then imported from the CSV file. Here is an example of importing an Excel
The example in this article describes how PHP saves session sessions using MySQL. Share to everyone for your reference. The specific analysis is as follows:
In many large systems generally have this function, but to separate the analysis, the
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