MySQL Host Master1. Edit the MySQL configuration file my.cnfserver_id = 1 #server_id服务器唯一标识Log_bin = Mysql-bin #借助mysql配置文件打开binlogRestart MySQL2. Create a user for master-slave replicationmysql> create user ' repl ' @ ' 172.17.0.% ' identified by '
1. Close the running MySQL service2. Open the DOS window and go to the Mysql\bin directory3. Enter mysqld--skip-grant-tables return--skip-grant-tables means skipping permission table authentication when starting the MySQL service4. Open a DOS window
Read Catalogue
A system database
Two Create a database
Three database related operations
A system databaseINFORMATION_SCHEMA: Virtual library, do not occupy disk space, storage is the database startup parameters, such as user
type of index
B-tree Index
B-tree indexes usually mean that all values are stored sequentially and that each leaf page is the same distance from the root.
The B-tree index speeds up access to data , and the storage
1. Look under the current server, what are those libraries (database)?Answer: show databases;2. How can I create a database?A: The database name is the last face of the create, and the semicolon ends3. Select a databaseWhen you make a table, row,
In MySQL, you cannot use the result of the set select directly, you must use the INNER join:Update TB1 INNER JOIN (SELECT ' field ' from TB2) tb3 on tb1.id =tb2.id set tb1. ' Field 1 ' = tb3. ' Field 1 'In SQL Server, we are updating the table with
First, downloadMysql-5.7.17-linux-glibc2.5-x86_64.tarwget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.17-linux-glibc2.5-x86_64.tar.gzor download it using Thunderbolt or a variety of peer browserssecond, the establishment of users, as well as
1. To optimize the query, avoid full-table scanning as far as possible, and first consider establishing an index on the columns involved in the Where and order by.2. Try to avoid using the! = or <> operator in the WHERE clause, or discard the engine
First, the system environmentThe system version after the Yum update upgrade isSecond, MySQL installationGenerally, the information given on the Internet is#yum Install Mysql#yum install Mysql-server#yum install Mysql-develBoth MySQL and Mysql-devel
Host Settings/etc/my.cnf#ID must be uniqueServer-id=1# #二进制文件名称前缀, generated files mysql-bin.000001,mysql-bin.000002Log-bin=mysql-bin# #记录目前有哪些mysql-bin file SHOW MASTER STATUS;Log-bin-index=master-bin.index# #有更新是否立即同步到日志, performance will be low,
Recently working with the Hive tool, a hive test environment was built. Usually we store the hive metadata information in the outside of MySQL, so we need to install and configure the MySQL database. The next step is to explain the installation and
Principle-indexing and principle Indexing
We strongly recommend that you refer to the link:Http://www.linezing.com/blog? P = 798 # nav-1
To put it bluntly, the indexing problem is a search problem...
Database indexIt is a sorted data structure
SQL queries by a value of the date.
-- Take 12:56:55 as an Example-- Convert (nvarchar (10), CreateDate, 120) => 2013-12-10-- DATEPART (month, CreateDate) => 12-- DATEPART (year, CreateDate) = & gt; 2013
-- This is also possible-- YearSelect
Basic MySQL transaction learning and experience sharing, mysql transaction Experience Sharing
A transaction is a logical group of operations that comprise all the units of this group of operations. If it fails or fails, it is a transaction. The
In-depth analysis of slow MySQL Sending data query, mysqlsending
An example is provided to show you how to solve the slow query problem in the MySQL Sending data table.
Recently, in code optimization, I found that an SQL statement is very slow, so I
How to import and export mysql database commands in linux
1. Use the mysqldump command to export the database (note the installation path of mysql, that is, the path of this command ):
1. Export data and table structure:
Mysqldump-u username-p
How to install and thoroughly Delete mysql decompress
1. Install mysql
(1) decompress the downloaded mysql compressed file to the directory where mysql needs to be installed.
(2) Open the decompressed folder, copy the default. ini file, and rename
Analysis of MySQL concurrency problems and solutions, mysql concurrency1. Background
For database systems, improving concurrency while ensuring data consistency under multi-user concurrency conditions has always been the goal of the database system,
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