The MySQL system variables include global variables (globals) and session variables (sessions), the global variable takes effect for all session, and the session variable includes the global variable. MySQL tuning is bound to involve the adjustment
This article references from the blog park, thanks to the original author.1 , preparing the file system for data storageCreate a new logical volume and mount it to a specific directory. The process is no longer given here. This assumes that the
DROP TABLE IF EXISTS ' sh_category '; CREATE TABLE ' sh_category ' (' id ' int (one) not NULL auto_increment, ' FID ' int (one) ' NOT null COMMENT ' parent class ', ' logo ' varchar ( 255) default null COMMENT ' icon ', ' name ' varchar (a) NOT
A little security policy after MySQL installation is to remove empty users and host users who are not localhost1. Delete Empty usersRemove Empty usersMysql> Select Mysql.user,host,password from user whereuser= "; Query usersmysql> Delete from user
Original addressServer operation (CMD)Turn on the server (you must ensure that MySQL is a Windows service): Net start mysql56 (this is the same name in the system process)
To see if a process table exists: Mysqld.exe process (present)Shut
p176) stored procedures and functions The difference is that the function must have a return value, and the stored procedure does not, the parameters of the stored procedure can use in, out, and inout types, and the parameters of the function can
Since Netcore Open source, then also use the open source MySQL database? Of course Netcore not only with the MSSQL database. Today I'll explain how Netcore uses MySQL for development.Create a new Netcore project firstThen write two classes and put
Write a SQL query to rank scores. If there is a tie between the scores, both should has the same ranking. Note that after a tie, the next ranking number should is the next consecutive integer value. In the other words, there should is no "holes"
MySQL GROUP by group takes the first N records implementationMySQL group, Fetch RecordsHow to take the first two bits of each group after group by I'll tell you how to implement the first N records of the group by group in MySQL.This is the test
Error log: Errors logs
Query log: Querying logs General Query Log/slow query LOG: Statements that have exceeded the set time (Long_query_time) or have not gone through the index
Binary log: Binary logs that record information about the data
MyISAM Storage EngineMySQL system tables Many use the MyISAM engine
Transaction not supported
Table-level lock, update data on table lock
Reads and writes are blocked, but read is not blocked
The cache caches only the index,
principle:Data synchronization with MySQL binary log filessteps:First, configure the main library (master)1. Modify the main library my.cnf configuration file, add the following configuration[Email protected] ~]# nano-w/etc/my.cnf [mysqld]
MySQL dual master replication, that is, mutual master-slave (only one master provides write operations), you can implement the database server hot standby, but a master down after the failure to achieve dynamic switching. And keepalived through the
MySQL master-Slave principle:1) At least 2 database servers, one master from, master to open the Bin-log function. (The Bin-log feature user records the statement that the master adds, deletes, modifies, and updates SQL.) )2) The process of
Assuming that the server has a 3306 instance running, we will add another 3316 port instance.Edit/etc/my.cnf directly and add the following (the Red section is the post-add configuration Item):[Client]user= Rootsocket=/tmp/mysql.sockPort= 3306[MySQL]
RHEL 5.7 uses rpm to install XtraBackup, rhelxtrabackup
I encountered some problems when installing Percona Xtrabackup 2.4.6 using RPM on Red Hat Enterprise Linux Server release 5.7 (Tikanga.
[Root @ DB-Server tmp] # yum-y install perl-devel
MySQL manual, mysql5.6 Chinese manualMySQL configuration file
The configuration file used by MySQL is my. ini, which is in the installation directory.
MySQL common configuration parameters:
1. default-character-set: default character set of the
Mysql part1 --- (DDL) Statement, part1 --- ddl
12:47:30
1. query the database under the current connectionShow databases;
2. Create a new databaseCreate database [if not exists] java03 [CHARSET UTF8];
// Create database java03;
3. delete a
Mysql part2 ----- DML, mysqlpart2 ----- dml
15:57:53
1. query all data in the table nameSELECT * FROM table name;
2. Insert dataInsert into table name VALUES (1 ,'',..);// Varchar --->''// All elements must be inserted.
Insert into Table NAME
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