The operation and maintenance of MySQL database mainly includes the setting of user rights, backup and recovery of database.I. Granting permissionsGrant permission list on the Library name. Table name to User name @ Source Address {identified by '
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 (
First of all:Use show variables like "%colla%"; show varables "%char%"; these two commands view the character set settings of the database and the server sideIf the view is gbk2312, or GBK, then can only support Simplified Chinese, traditional and
Index Unique IndexUnique: Constraint cannot be duplicated (can be empty) PS: Primary key: Unique and cannot be empty acceleration lookupSupplement for many-to-many SQL statements: Add CREATE TABLE TB11 (ID int auto_increment PRIMARY key, name
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
cd/usr/Localwgethttp//repo.mysql.com//mysql57-community-release-el7-7.noarch.rpmRPM-IVH mysql57-community-release-el7-7. noarch.rpmYum Install-Y mysql-serversystemctl start mysqld.servicesystemctl status Mysqld.servicecd/etc andVIMY.CNF and add at
1. Install the XAMPP integrated environment locally2. Introduce the installed MySQL module in the Mysql.jsConst MySQL = require ("MySQL");//Initialize Const CONF = { host: "localhost", User: "root", password: "", Port: "3306", //Use which table
MySQL service failed to start, you can use the exclusion method to find the cause:If you modify the MY.CNF after restarting the MySQL service fails, in most cases the configuration file has errors,By backing up the original configuration file and
Primary database server Configuration Master 51Master from the configuration to maintain two databases in the database and table consistent1 Doing user authorization2 Enable Binlog logging3 Viewing the Binlog log file in use1.mysql> grant
Delete the data in the table, using delete. The format is:Delete from table name where remove condition; Example: Delete a record whose name is Zhang San in the student table.Delete from where="Zhang San"; Clears the data in the table, saves
/* time:2017.01.02--2017.01.04* AUTHOR:WJ* Function: Connect the database, read the picture from the database and display (succeeded)*/"Reference link"MySQL deposit image +QT read in the database read the picture-lpdpzc column-Blog channel-csdn.net
The syntax of a single-table querySELECT Field 1, Field 2 ... From table name WHERE condition GROUP by field have filter ORDER by field limit number of bars Second, the execution order of the
Query: Field Select field 1, Field 2, Field 3 from table name where condition"+" sign: Only for numeric calculations select 1+2 or select 1+ ' 2 '"CONCAT": Used for connection string CONCAT (character 1, character 2), such as a select CONCAT (12)
The 5.6 installation package is a ZIP file that contains data (a tablespace file and a log file), a bin folder, and so on. Unlike in the past, just double-click on the installation. msi. Therefore, this record installs the installation package as a.
WINDOW10 installation mysql-5.7. --Winx64.zip Original https://www.cnblogs.com/ericli-ericli/p/6916285.htmlD:\share\src\window7-mysql\mysql-5.7. --Winx64.zip1. Unzip2. Create My.ini, under the Basedir directory [client]default-character-Set=UTF8
Use Xtrabackup to back up and restore the database,
Install Xtrabackup
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.9/binary/redhat/7/x86_64/percona-xtrabackup-24-2.4.9-1.el7.x86_64.rpmyum install percona-xtrabackup-24-2.4
178. Rank Scores solution, rankscores
Problem:
Write a SQL query to rank scores. if there is a tie between two scores, both shoshould have the same ranking. note that after a tie, the next ranking number shocould be the next consecutive integer
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.
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