View the currently supported storage engines
Mysql> show engines;+--------------------+---------+----------------------------------------------------------------+-------------- +------+------------+| engine | Support | Comment
SQL:Structured Query Language (Structured Query language)Classification:1. Data manipulation (Management) language: manipulate data directly; (DML: Data Management Language)Query the data and get the data. (DQL)Manage data, add, delete, modify data.
DELIMITER is actually defining a statement to execute the TerminatorDelimiter in MySQL:Http://blog.sina.com.cn/s/blog_4c197d420101d3oa.html1: Define Stored Procedure drop PROCEDURE test_insert;D elimiter $$//define Terminator Create PROCEDURE
1. Create and edit the file/usr/sbin/bakmysql, command:Vi/usr/sbin/bakmysqlThe contents are as follows: 1 db_ user= "root" 2 db_passwd= "root" Span style= "color: #008080;" >3 db_name= "Db_test" 4 # the directory for stories your backup
1. Forget the root passwordEdit MySQL Master profile my.cnf in the [Mysqld] field to add parameters skip-grant, restart the database service, so that you can enter the database without authorization mysql-uroot, modify the corresponding user
Stored Procedures and functions:To create the sample code:DELIMITER $ $CREATE PROCEDURE proc (in c_id int, in C_name VARCHAR (a), out Count INT) READS SQL databegin SELECT * F ROM course WHERE cou_no = c_id OR cou_name = c_name;
The first step: Install dependent yum installed Perl-data-dumperStep Two: Initialize the internal information of the MySQL database./scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data------------------Whether the
Import and export MySQL database under LinuxHttp://www.cnblogs.com/jiunadianshi/archive/2011/04/20/2022334.html (this does not apply)------------------The actual adoption of success is
Ok
MySQL
SELECT * FROM Hengtu_demandpush awhere (A.did,a.mid) in (select Did,mid from Hengtu_demandpush GROUP by Did,mid have count (*) > 1)OrSELECT * FROM Hengtu_demandpush GROUP by Did,mid have Count (*) >11, look for redundant records in the table,
Work needs, the use of MySQL paging function, found on the internet a good paging stored procedures, the code to organize a bit! Stored Procedure CodeCREATE PROCEDURE' Sp_hj_splitpage ' (inch_pagecurrentint,/*Current Page*/
1 on-line environment sometimes considering the need to do an incremental backup database, so write a simple script2 Add automatic tasks do it every hour or less.#!/bin/sh#author RuM#date 2015-07-10Bakdir=/tmp/mysqlbakBakdir_full= $BAKDIR/fullbakdir_
18.1 Data BackupPossible causes of data loss include:
Storage media Failure
User's error action
The server is completely paralyzed
18.1.1 Copy data file (only for tables with storage engine MyISAM)18.1.2 mysqldump1. Backing up
Set up MySQLFirst copy the Mysql.server to/ETC/INIT.D directory named mysql# CP/own installation directory/mysql/share/mysql/mysql.server/etc/init.d/mysql then go to/etc/ RC2.D directory, which is the default boot level for Debian. After
Here I summarize the common methods for judging whether records exist:SQL statement: SELECT COUNT (*) from TableName;The value of Count (*) is then read to determine if the record exists. For this method of performance is a bit wasteful, we just
This semester studied the principle of database system, did the experiment, mark a remember.Directory (without a key directory not happy ...) )1. T-SQL simple query, connection query(1) Using SQL statements to build a library, build a table, and
Title1.100W data insertion, define while loop to execute 100W times from the 1-100w,insert statement, run from 11 o'clock to 10 in the morning of the next day, a total of 11 hours!!!1 DELIMITER $$2 3DROP PROCEDUREIFEXISTS ' Havefun '.'
Create data (insert data)insert into 表名(字段列表) valuse(值列表);insert into exam_student(stu_name,stu_no) values(‘xiaoming‘,‘1205040219‘);If you need to set values for all the fields when inserting data, you can omit the field list, which is required to
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