MySQL startup parameters (i)--init_file

Sometimes we want MySQL to be able to do some database operations at startup, such as adding an index to the cache and so on. Because some of the configuration will expire after MySQL reboot, after reboot we can let MySQL re-execute some SQL

MySQL Master-slave replication

MySQL 5.6 X64 & CentOS 7 X64Main Library: 192.168.1.1From library: 192.168.1.21. Main Library ConfigurationVi/etc/my.confSet the following parameters under [mysqld]:Server-id=1 #主库标识Log_bin=mysql-bin #开启mysql二进制日志#binlog-do-db=mydb

MySQL basic three-value type, index

My 1am,1pmNumeric type Int (4) Float (5,2) Varchar (4) Enum type Enum (' female ', ' male ') Set (' book ', ' Football ', ' A ' ....) Constraint conditionsNull Default ExtraThe default is allow default

MySQL Master-Slave backup

MySQL master-slave backup, listen to a noun is very tall, in fact, is the original implementation of MySQL, you only need a simple configuration can be achieved.The first step: Keep the master-slave two database is synchronous, preferably manually

MySQL (iv)--records in the operational data sheet

Inserting records INSERT [ into]Tbl_name[(col_name,...)]{VALUES |VALUE} ({expr| DEFAULT},...),(...),...//Law Two: The difference is that this method can use subqueries (subquery)INSERT [ into]Tbl_nameSET col_name={Expr|DEFAULT},...//method

MySQL Learning record (ii)

First, the indexCreated: CREATE INDEX index_name on table_name (field)Delete: Drop INDEX index_name on table_nameIi. constraintsCREATE TABLE tablename (Field_name field_type {notnull,unique,check (filed>0), Primary key Auto_increment,constraint

User command line mode even MySQL database

Now is a manual primer, not too dependent on the IDE, using the MySQL JDBC Jar package to connect the database as follows:Demo File content: PackageCc.openhome;ImportJava.sql.*; Public classConnectiondemo { Public Static voidMain (string[]

Some basic syntax for MySQL optimization

1. Slow SQL consumes 70%~90% database CPU resources;2.SQL statement is independent of the program design logic, relative to the program source code optimization, the optimization of SQL statements in the cost of time and risk is very low;3.SQL

Use of profile in MySQL

1.profile available in mysql5.0.37 and above2. See if profile is availableSELECT @ @profiling;to see if profile is enabled, and if the PROFILNG value is 0, you canSET profiling = 1;enabledmysql>select Count (*) from roi_summary;then show Profiles

MySQL Efficient distributed SQL

1 Public stringGetquerysql (Itspareaquerymodel model,ObjectState =NULL)2 {3 varSqlbuilder =NewStringBuilder (850);4Sqlbuilder.appendformat (@"{0}5 / *---Script for Select Top N Rows---* /6 SELECT sql_calc_found_rows7

MySQL service-MySQL variable type and variable settings

One, MySQL variable type:MySQL uses variables to define the current server's characteristics, save state information, and so on. We can configure MySQL by manually changing the value of the variable, or we can get the current state information of

Change the password for MySQL under Ubuntu

1. First, go into the environment, i.e. mysql-u root-p , then enter the original password2. mysql > will appear at this time3. Start Change Password: mysql > Use MySQL;        mysql > Update user set password = password (' modified ') where user = '

MySQL Foundation II

a User Management1. Create user identified by ' password ';2. Delete users drop user xxx;3. Renaming users rename user xxx to xxxx;4. Modify the current user password setpassword=password (' xxxx ');5. Modify other user password setpassword for xxx

Complete MySQL work with a script

1. Using MYSQL-E to execute MySQL SQL statements in the script#!/bin/bash#simple MySQL Shell usagelogtime=`Date "+%y-%m-%d"' LOG=Call_sql_${logtime}.logEcho "Start Execute SQL statement at ' date '">>${log} #execute SQLStatMySQL-U

MYSQL: Delete and change

CREATE TABLE Table name(Whether the column name data type is empty (whether the primary key | is a unique | foreign key relationship),Column name data type ... (The last column does not have a comma))Create DATABASE nameInsert into database name.

MySQL Backup and recovery (Note II)

MySQL Incremental backupPremise, the server needs to open the binary logmysql> SHOW BINARY LOGS; View all binary filesmysql> SHOW MASTER STATUS; View current binary filesMysqlbinlog Instructions for useMysqlbinlog A temporary table is generated when

MySQL Master-slave replication (super Simple)

MySQL Master-slave replication(Super Simple)How to install MySQL database, do not say here, just say its master-slave copy, the steps are as follows:1, the master-slave server for the following actions:1.1. Consistent version1.2. Initialize the

JMeter Test MySQL Database

The first step is to download the JDBC driver: Mysql-connector-java.jar, put the jar package in JMeter lib\ext. 2. Add the jar package to the test plan, and see.650) this.width=650; "src="

MySQL entry (5)-create, modify, and delete tables

MySQL entry (5)-create, modify, and delete tables A table is the basic unit for storing data in a database. A table contains several fields or records. Table operations include creating, modifying, and deleting tables.   1. Create a table Create a

MySQL paging optimization, mysql Paging

MySQL paging optimization, mysql Paging Recently, I helped my colleagues rewrite a MySQL SQL statement that involves two tables, one of which is a dictionary table (a field needs to be returned ), the other table is a business table (which contains 1

Total Pages: 3233 1 .... 2998 2999 3000 3001 3002 .... 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.