Shutting down firewalls and SELinuxPrimary (Master) server: 192.168.0.4From (slave) server: 192.168.0.5First configure the primary server:1.[[email protected] etc]# vim my.cnf[Mysqld]Datadir=/var/lib/mysqlSocket=/var/lib/mysql/mysql.sockUser=mysql#
MySQL modifies a column, modifying only the type of the column, such as the original Decimal (11,2), to Int (11), which can be writtenALTER TABLE COLUMN int (DEFAULT0' notes ';Note that although you only want to modify the column type, the
1.MySQL Copy the same table structure method:1) CREATE TABLE table_name as SELECT * FROM table1 where 1=2 (or limit 0);2) CREATE TABLE table_name like table1_name;The use of the two:As: Used to create the same table structure and copy the source
Use sync Notes for Notes to blog to test! Knowledge point is a bit miscellaneous, to organize (local debugging) to establish a site:1: Establish the domain name IP correspondence in the Hosts file (C:\WINDOWS\SYSTEM32\DRIVERS\ETC):127.0.0.1 www.****.
Different database self-growth ID configurationCan be used concurrently for different databases@Id@GeneratedValue (strategy = Generationtype.auto)2 for MySQL@Id@GeneratedValue (strategy = generationtype.identity)3 for Oracle@Id@GeneratedValue
A federated index is also called a composite index. For composite indexes: MySQL left-to-right uses fields from the index, and a query can use only one part of the index, but only the leftmost section. For example, the index is key index (A,B,C).
MySQL queries are case insensitive by default, such as:SELECT * FROM table_name where a like ' a% 'SELECT * FROM table_name where a like ' A% 'SELECT * FROM table_name where a like ' a% 'SELECT * FROM table_name where a like ' A% 'The effect is the
MySQL default encoding is Latin.My MySQL version is 5.6. There is no My.ini under the installation path, but there is my-default.ini. In fact, MySQL does not have a configuration file can also be started, but in order to set the encoding, you need
For some time without writing and forgetting./*Cancel foreign KEY constraint*/SETForeign_key_checks=0;/*create C1 table primary key ID field name*/DROP TABLE IF EXISTS' C1 ';CREATE TABLE' C1 ' (' ID ')int( One) not NULLauto_increment, ' name
Recently in the last interface Test training course, need to use MySQL, downloaded from the official website x64 Compression package version, after the decompression according to Baidu experience in the instructions, step-by-step use, started normal,
Creation of tablesCREATE TABLE ' Lee ' (' id ' int (ten) is not NULL auto_increment,' Name ' char (DEFAULT NULL),' Birthday ' datetime DEFAULT NULL,PRIMARY KEY (' id ')) engine=innodb DEFAULT Charset=utf8Data insertion:Insert into Lee (Name,birthday)
If the ID is a primary key or has an index, you can find it directly:Method One:Query the SQL statement for the previous record (if you have additional query criteria, remember to add other_conditions to avoid unnecessary errors):Select * from
premise: In two machines first confirm SELinux,iptables shut down, do a good yum sourceFirst, buildDo the following on the 143:Yum install-y MySQL Mysql-serverthen modify /etc/my.cnf to add two lines in the mysqld module.Log-bin=mysql-binServer-id =
MySQL Database1. Introduction to the databaseDatabase concept: A warehouse that organizes, stores, and manages data in accordance with its data structure.2. Common terminologyDatabase: is a collection of some associated tablesData sheet: A table is
The CI of PHP is a framework of the MVC pattern, this article is through the PHP+CI to the MySQL database to carry on the enhancement and deletion check.0. First create a database and data table on MySQL database side1 Create Databasetest;2 Usetest;
Install MySQL First:Sudo?apt-get?install?mysql-server?mysql-client?1. Terminal starts Mysql:/etc/init.d/mysql start;(Stop, restart.) )2. Login Mysql:mysql-uroot-p (login with root account) and enter the password;3. View all database names: show
Service mysqld stop//stop MySQL ServicesCp-rf/var/lib/mysql/home/data//Copy the default MySQL database directoryChown-r mysql:mysql/home/data//Give new directory authorizationModify the my.cnf, to make sure that you have no problem, you can comment
Manually compile Apache 2.2.6 + PHP 5.3.28 + Mysql 5.6.16 and centos5.3.28 in CentOS 6.5
I haven't configured the server for a long time, so I have taken a lot of detours. Some parameters have changed and the searched online documents have not been
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