Settings of the MySQL decompressed character set in windows (MariaDB is also applicable) MariaDB
MySQL character set extraction in windows (MariaDB is also applicable)
Today, I got some configurations of MySQL decompressed and found some
I have used the following backup methods for MYSQL backup:
Mysqldump,
Mysqlhotcopy,
Backup table,
SELECTOUTFILE,
Or back up binary logs (binlog ),
You can also directly copy data files and related configuration files.
MyISAMTables are saved
MYSQL backup methods
MysqlDatabase
BackupThere are four main methods:
1. mysqldump2. direct copy (cp, tar, gzip, cpio)3. sqlhotcopy4. synchronous replication
1. mysqldump backup:
Mysqldump generates text files that can be transplanted to other
MYSQL obtains the primary key ID of the update row.
In some cases, we need to update the status of a record to the data table, and then retrieve it, however, if you do not have a primary key to confirm the unique record before the update, you cannot
How to record SQL statements executed by MySQL? Most of the time, we need to know which SQL statements MySQL has executed, such as the damage caused after MySQL is injected. As long as there is a record of SQL statements, you can know the situation
[Switch] MySQL flash exit to solve the problem: enter the password flash, and there is no prompt at all. the password must be correct first ..
So I thought of skipping permission verification directly and used the following methods:
I,
First,
How to copy table data from MySQL to a new table 1. Copy table structure and data from MySQL to a new table
Create table new TABLESELECT * FROM old table
2. only copy the table structure to the new table
Create table new TABLESELECT * FROM old
In Linux, mysql uses shell scripts to back up mysql DB data in linux. The first method is to back up data only, store data in text files. The second method is to back up the entire database and generate an SQL file, which is more convenient for DB
Mysql partition management
The purpose of a hash partition is to evenly distribute data to each partition after hash calculation based on a column. compared with range and list partitions, the hash partition does not need to explicitly specify a
Self-made mysql master-slave replication (real-time) software -- configure mysql 5.5 -- my. ini -- innodb database engine configuration
My machine configuration is not a high-end configuration. generally, 2 GB memory is configured for a laptop.
MySQL slow query log 1. View slow query configuration
// View slow query time show variables like "long_query_time"; 10 s by default
// View the slow query configuration. show status like "% slow_queries % ";
// View the slow query log path
MySQL regular 1, or
Select * from product where name regexp 'Hello | world' or
Select * from user where name regexp '[123] tom' matches any
[123] is equivalent to 1 | 2 | 3
Select * from user where name regexp '1 | 2 | 3 tom'
2. exclusion
PDO_MYSQL-1.0.2php_pdo_mysql_int.h: 25: 19: Fatal error fault:
A fatal error occurs during compilation and installation of PDO:
/Home/liujijun/software/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h: 25: 19: Fatal error: mysql. h: no file or directory#
The mysql view is used to export tables from one or more basic tables (or views. Unlike the basic table, it is a virtual table. The database only stores View definitions, but does not store view data. The data is still stored in the original basic
Compile Mysql5.6.17 Ubuntu in Ubuntu12.04
1. install Mysql
(1) install the package required for compiling source codeSudo apt-get install make cmake gcc g ++ bison libncurses5-dev
(2) Download and decompressWget
Slow connection to mysql in linux: find/-name my. cnf to find the storage path of mysql configuration file my. cnf
The path I found is/etc/my. cnf.
Run vi/etc/my. cnf to edit the file.
Locate [mysqld] and add skip-name-resolve below it (you can
Obtain the mysql date from the first day of the month to obtain the first day of the next month.
Select curdate (); -- get the current date select last_day (curdate (); -- get the last day of the month. Select DATE_ADD (curdate (), interval-day
Mysql groups by day, month, week, and quarter by day: select DATE_FORMAT (o. orderDate, '% Y % m % d') weeks, count (*) count from orders o group by weeks;
Grouping by month: select DATE_FORMAT (o. OrderDate, '% Y % M') weeks, count (*) count from
Mysql Image access
Package com. mycompany. mysql. image; import java. io. *; import java. SQL. *; public class Main {public static void main (String [] args) {Main m = new Main (); // m. storeImage (); m. getImage ();} private static String URL =
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