Stored procedure syntax: CREATE PROCEDURE ProcedureNameBeginSQL 1end$ Show all stored procedures Show procedure status;Calling the stored procedure call procedurename (); Contains an if statement that has been saved:CREATE PROCEDURE ProcedureName (
MySQL Common operations
Set Change root password
Connect to MySQL
MySQL Common commands
MySQL User management
Common SQL statements
MySQL Database backup recovery
Set Change root passwordBy default, the root user password
#访问控制# #登录mysqlMysql-u root-p# #查看所有用户Select User from Mysql.user# #创建用户CREATE USER ' username ' @ ' host ' identified by ' password ';# #删除用户Note that you must explicitly give the hostname of the accountDrop user ' test ' @ ' localhost ';#
A system databaseINFORMATION_SCHEMA: Virtual library, do not occupy disk space, storage is the database startup parameters, such as user table information, column information, permission information, character information,
1. Concept of storage EngineThe storage engine (the storage engine can also be a table type) is actually how to store the data, how to index the stored data, how to update the data, and how to implement the technology. Data in MySQL is stored in
First of allTo add a pymysql module:Code:Import Pymysqldb = Pymysql.connect (host="LocalHost", User="Root", password="123456", db="World", port=3306)# Open Database connectioncur = db.cursor ()# get an action cursor using the
First, download phpstudy from the official website and other pre-preparationCMD inPip Install PymysqlStart Phpstudy,apache and MySQL after running "Other options Menu"-"MySQL Tool"-"MySQL command line"Password is rootThis is used in SQL language,
One. MySQL service installation 1. Download:Address: http://dev.mysql.com/downloads/mysql/2. Installation:The entire directory after extracting the downloaded mysql-5.7.16-winx64 compressed package is placed in your favorite location, I put it in
EnvironmentWin10,python3.6,pycharm,mysql57InstallationMySQL installation, the cost of a bit of trouble, then install Pymysql:Pip Install PymysqlThen you can use python3.6 to operate MySQL, but to use MySQL in the pycharm, you need some steps, see
1. Package PagebeanImport java.util.list;/** * Pagination of JavaBean * @author Administrator */public class Pagebean {//current page private in T Pagecode; Total pages//private int totalpage; Total record number private int totalcount;
Set password for ' root ' @ ' localhost ' =password (' mynewpass4! ');mysql5.7 The password security check plug-in (Validate_password) is installed by default, and the default password-checking policy requires that the password must contain:
Installation Environment: CentOS7 64-bit mini version, install MySQL5.71. Configure the Yum sourceDownload the Yum source RPM installation package on the MySQL website: http://dev.mysql.com/downloads/repo/yum/# 下载mysql源安装包shell> wget
Today by statement: SELECT * FROM mytable to outfile ' D:/mytable.xls '; Export external files, but anyway unsuccessful, the system prompts: the MySQL server is running with the--SECURE-FILE-PRIV option so it cannot execute this state ment when
InnoDB, MySAM, and mysqlinnodbmysam in mysqlFeatures of innoDB and MyISAM in mysql -- ENGINE = innodb
1. Provides transaction processing and supports row locks;
2. read without locking, increasing the number and space of concurrent reads;
3.
Mysql for databases (5) -- [reprint] mysql exercises and mysql exercisesOriginal post address: http://www.cnblogs.com/wupeiqi/articles/5748496.html
Sample Data SQL:
/* Navicat Premium Data Transfer Source Server: localhost Source Server Type:
[MySQL Status] Queries, Questions, read/s differences, Com_Commit and handle_commit,Queries: this status variable indicates the number of Queries received by the mysql System, including the query Questions in the stored procedure. This status
Summary: Mysql optimization and mysql OptimizationMysql storage engine
Select the appropriate storage engine Innodb myisam
Myisam: writes data very quickly and is suitable for dedecms, phpcms, discuz, Weibo systems, and other systems with many write
MySql batch database operations, mysql database
1) Batch insert
Batch operations mainly use the foreach of Mybatis to traverse the parameter list and perform corresponding operations,
Therefore, the batch insert, update, and delete statements
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.