MySQL Master-slave replication

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 Modify column

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

MySQL Backup and recovery

1. Backup and Backup Discuz Library[[email protected] ~]# mysqldump-uroot-p654321 discuz > /data/discuz_sql.bak//backup Discuz Library[[email protected] ~]# mysql-uroot-p654321 discuz /data/discuz_sql.bak//Recovery Discuz Library2. Back up and

The difference between as and like usage when MySQL creates the same table structure

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

MySQL basic knowledge

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.****.

Hibernate Mysql Self-growth annotation configuration, table no associated annotation Mode Association query

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

MySQL Federated Index Detailed

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 Case-sensitive query

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

Solving the problem of MySQL writing data garbled

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

MYSQL Trigger Simple instance

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

MySQL ERROR 1045 (28000): Access denied for user workaround

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,

MySQL backup script

#!/bin/shDump=/usr/local/mysql/bin/mysqldumpOut_dir=/data01/mysqldata_bakLinux_user=bakmysqlDb_name= database namedb_user= User Namedb_pass= PasswordDays=7CD $OUT _dirDate= ' Date +%y_%m_%d 'Out_sql= "$DATE. SQL"Tar_sql=

MySQL Case then uses

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)

MySQL queries the previous and next records on the current data

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

MySQL master-Slave Build-yum Chapter

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 =

A preliminary glimpse of MySQL database

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

Php+ci MySQL for additional pruning and checking

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;

Common commands for MySQL under Ubuntu

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

CentOS Modify MySQL Database directory DataDir

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

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

Total Pages: 3233 1 .... 3188 3189 3190 3191 3192 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.