Environment: Two Ubuntu 12.04.5 virtual machinesMySQL-server-5.5Master (192.168.240.130) Slave (192.168.240.129)(1See if binary logs are turned on show variables like' Log_bin ';(2) Login master, open a database account grant REPLICATION SLAVE on* *
1.2 Concurrency control1.2.1 Read/write lockWhen dealing with concurrent reads or writes, the problem is solved by implementing a locking system consisting of two types of locks. These two types of locks are often referred to as shared locks and
MySQL for security, by default users are allowed to log on locally only, but in this case, you still need to use the user for remote connection, so that they can be remotely required to do the following:First, allow the root user to telnet anywhere,
We already know that MySQL uses the SQL SELECT command and the WHERE clause to read data from a data table, but the command may not work correctly when the supplied query condition field is NULL.To handle this situation, MySQL provides three large
Download the MySQL source package and unzip it.wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.73.tar.gzTAR-ZXVF mysql-5.1.73CD mysql-5.1.73
Create user, Basedir DataDirUseradd-s/sbin/nologin
The alter ADD command is used to increase the table's fields.Alter ADD command format: ALTER TABLE name add field type other;For example, a field passtest is added to table MyClass, the type is int (4), and the default value is 0:Mysql> ALTER TABLE
"One: The meaning of the MySQL query plan output column:1.id: The identification of each operation performed independently, indicating the order in which the objects are manipulated, the larger the ID value, the first execution, and, if the same,
I Linux system Centos71.Err2003My personal situation is because the firewall on Linux is turned on and blocked 3306 remote connection of this MySQL portWorkaround:CentOS 7.0 defaults to using firewall as the firewall and now shuts it downSystemctl
For example: My username is the root password is 123 SQL script exists C disk name for Test.sql database for testThere are two ways to execute a script1: Open cmd Enter the following command (do not need to convert directory)>mysql-u root-p123 after
First, the experimental environmentSystem: centos6.5Software: mysql-5.5.32.tar.gzSecond, the experimental steps
Basic concept and principle of master-slave replication
MySQL Replication is an asynchronous copy process, copied from one
Set primary-primary replication: 1, set up a user with copy permission on both servers, 2, modify the configuration file: # on the primary server [Mysqld]server-id = 10log-bin = Mysql-binrelay-log = Relay-mysqlrelay-log-index = Relay-mysql.indexauto-
Sql_mode may be a variable that is easier for developers and DBAs to ignore, and is empty by default. The Sql_mode setting is actually a more risky setting because it allows for some illegal operations, such as inserting null into a NOT null field,
Learn MySQL with teacher Wang: Install mysql teacher: Wang Shaohua QQ Group No.: 483773664 Learning GoalsDownload and install MySQLFirst, download MySQL (a):http://dev.mysql.com/downloads/(b), Mysql version differences:1. MySQL Community Server
quickly modify the table structure of a MySQL table-- excerpt from "MySQL Management"ALTER table name MODIFY column name data type; This command can modify the table structureIn addition, you can modify the table structure as follows:First create a
-Create DATABASE Sysdb default Character set utf8;-delete databases drop database sysdb;-view The default character set of the database show create database sysdb;-modify the databases alter SYSDB default character set gbk;#### table
-u${user---skip-extended-insert--database ${dbname}--table ${tablename} > ${tablename}.sqlIn the SQL file exported with the above statement, each piece of data is saved according to an INSERT statement, which makes it easy to compare data
SQL-mysql common operation statements (Entry level), sqlmysql
1. Enter the database:
Mysql-u root-p
Mysql-h localhost-u root-p database_name
2. List Databases
Show databases;
3. Select a database:
Use databases_name;
4. List data tables:
Show tables;
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