1: Download the binary installation package (make sure no MySQL database server is installed): mariadb-10.2.12-linux-x86_64.tar.gz, mariadb-10.2.12.tar.gz.2: Create a System account specify the shell type (default automatically creates a group with
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 '
MySQL> select mod (29,9);//Modulo function+-----------+| MoD (29,9) |+-----------+| 2 |+-----------+row in Set (0.00sec)MySQL> select mod (29,2);+-----------+| MoD (29,2) |+-----------+| 1 |+-----------+row in Set (0.00sec)MySQL>
In the database command line only exports the data, does not have around the data structure the time appears secure_file_priv option so it cannot the execute this statement error.Here's how to fix it:1. Create a new directory to/path/to/mysql-files
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
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
1. CONCAT (string1,string2,...)SELECT CONCAT (' L7 's jersey number is ', L7number) from tableIf one of the parameters is null, the result of stitching is null2.concat_ws (SEPARATOR,STR1,STR2,...)Separator represents the delimiter, if the delimiter
Table structure replication (with data)CREATE TABLE New SELECT * FROM oldTable structure replication (without data)CREATE TABLE New SELECT * from old where 1=2This gives a where condition 1=2 is to give the data to an empty tableTable structure
Xtrabackup backup MySQLMysqldump is based on a logical backup, which is equivalent to re-executing the SQL statement. Xtrabackup is equivalent to a physical backup of a file.Installation dependencieswget ftp://rpmfind.net/linux/dag/redhat/el6/en/x86_
Mysql stored procedure,
Create a stored procedure
1. Create a stored procedure without parameters.
Delimiter // # The default end mark of mysql is a semicolon, and now it is changed to two slashes. Create procedure pro_student () begin delete
In linux, configure mysql5.6 to support IPV6 connections.
Introduction:
This article describes how to configure mysql to support IPV6 connections in linux.
Environment requirements:
1. debian7.5 Operating System Virtual Machine
2. MySQL database,
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
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