Binlog Open, view:> Show variables like ' Log_bin '; #查看是否开启> Set Sql_log_bin=1 | | Set sql_log_bin=0; #启用 | | Deactivate> show binary logs; Get a list of binlog files, corresponding to Mysql-bin.index;> Show master Logs; View our Lord's Binlog>
[Mysqld]the path where the Datadir=/var/lib/mysql database residesSocket=/var/lib/mysql/mysql.sock Socket PathOld_passwords=1 compatible with hash password before version 4.1Max_connections = max number of connectionsmax_connect_errors=500000000
Turn from:automatic generation and update of timestamp in MySQLThe timestamp type in MySQL can set default values, just like any other type.1, Automatic Update and insert to the current time:Table:---------------------------------Table Create Table--
Put the MySQL installation files into the virtual machine, the FTP software upload upConfigure Yum to install MySQL with YumTo reset MySQL: mysql_install_db--datadir=/var/lib/mysqlEnter/var/lib/mysql Modify PermissionsChown Mysql:mysql *-REnter the
I. IssuesDatabase code: UTF8UTF8 COLLATE Utf8_general_ci;Table code: UTF8drop table if exists ' test ', create table ' Test ' (' ID ' bigint () not NULL auto_increment COMMENT ' id ', ' name ' varchar (d) Efault ', ' create_time ' timestamp not NULL
First, the database operation1. Create a database:>create DATABASE db_name; Db_name for Database name>create DATABASE IF not EXISTS db_name default character set UTF8 COLLATE utf8_general_ci; Conditions to create a database2. Delete the
It is often necessary to import or export large SQL files in your work. It is generally OK to export, but in the import to other MySQL libraries, "Packet forquery is too large (1706 > 1024) may appear. You can change this value on the server by
Sometimes, in the test environment to forget the root password of MySQL, retrieve or change the password is critical!01, can use root to enter the databaseMysql-u RootMysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpass '); # #
Force index of Forces index SELECT * from TABLE1 (FIELD1) ... The above SQL statements use only the indexes built on FIELD1, not the indexes on other fields. Ignore index IGNORE index SELECT * from TABLE1 IGNORE index (FIELD1, FIELD2) ... in
SELECT * Form user where username = '/1;At first, I thought it was the wrong grammar ....Results come out a bunch of results.The original condition is ' divide by 1 '"What's the result of dividing by 1?"It turns out that there is an implicit
Update Source listThe shortcut key "Ctrl+alt+t" opens "Terminal terminal Window", enter "sudo apt-get update" and "Enter the root user's password"--return, you can.As shown:If you do not run the command and install MySQL directly, a "few packages
Function: Working with MySQL database via Python1. Installing Mysql-pythonTo enable Python to operate MySQL requires the Mysql-python driver, which is a necessary module for Python to operate MySQL.: https://pypi.python.org/pypi/MySQL-python/You can
Install the compressed version of the *.tar.gz version of MySQL1. Add MySQL group and MySQL user to set the MySQL installation directory file owner and owning group.[[email protected] Java EE] #groupadd MySQL[[email protected] Java EE] #useradd-r-G
Https://dev.mysql.com/doc/internals/en/memory-allocation-mysql-server.htmlMySQL Internals manual/memory allocation/memory Allocation in the MySQL Server (SQL Directory) 9.1 Memory Allocatio N in the MySQL Server (SQL Directory)The basic logic to use:
1. Create a table2. Create a stored procedureCREATE PROCEDURE User ()INSERT into User (name,sex) VALUES (' 1111 ', ' 1 ');3. Create timerCREATE EVENT IF not EXISTS eventjobOn SCHEDULE every 1 SECONDOn completion PRESERVEDo call user ();4.Turn on
Mysql 5.7.17 installation and configuration method graphic tutorial (CentOS7), 5.7.17centos7
Notes for installing mysql on centos 7
1. mariadb database is installed on CentOS7 by default., Uninstall mariadb.
Rpm-qa | grep mariadb
Yum remove mariadb-
MySQL union and order by implementation method at the same time, mysqlunion
In MySQL, union and order by can be used together, but some minor problems need to be paid attention to during use. The following is an example. First, let's look at table t1
Mysql and mysql download
I remember that when I was working on a project, I heard a sentence and tried not to use subqueries. So let's take a look at this article to see if this sentence is correct.
Before that, we need to introduce some conceptual
Mysql million-level paging optimization, mysql PagingNormal Paging
Data paging is very common in webpages. pages are generally limit start and offset, and start is calculated based on the page number.
Select * from user limit 1, 20
When the page
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.