Installation and basic operation of MySQL

First, MySQL installation steps1. Check if MySQL is installed on your Linux systemsudo service MySQL start2. Install MySQL server, core programsudo apt-get install Mysql-server3. Install the MySQL clientsudo apt-get install mysql-clientDuring

MySQL basic four stored procedures

The stored procedure: the Declaration and assignment of a variable.CREATE PROCEDURE P1 ()Begindeclare age int default 18; set age :=age+20;select age from dual;EndCalling the stored procedure: Call P1 (); The result is as follows:Second, the

MySQL Note: Data insertion

First, insert the recordCREATE DATABASEMYDB; UseMYDB;CREATE TABLE IDENTITY(NAMECHAR( -)PRIMARY KEY, BIRTHDATETIME not NULL, HOMECHAR( -));CREATE TABLESTUDENT ( Number INT PRIMARY KEYauto_increment, NAMECHAR( -) not NULL, AgeTINYINT not NULL,

Implementing MySQL master-slave replication

First, MYSQL master-slave replication principle1. Master records These changes in the binary log before each transaction updates the data. After the write binary log is complete, Master notifies the storage engine to commit the transaction.2. Slave

Several simple query statements for MySQL tables

1. Create DATABASE Database-name2. Deleting a database Drop DB dbname3. Creating a new Table CREATE table tabname (col1 type1 [NOT NULL] [primary key],col2 type2 [NOT NULL],..)To create a new table from an existing table:A:CREATE table tab_new like

MySQL Step over the pit (a) mysql start or link failed

Sometimes when you start a MySQL database with a command mysql-u root-p or a server, it throws an exception and fails.The following are the anomalies that have been encountered.1, 1) Thrown exception: Error 2002 (HY000): Can ' t connect to local

MySQL NOTE: triggers

First, the basic knowledgeA trigger is a specific action triggered by an event such as INSERT, UPDATE, and delete.When trigger conditions are met, the database system executes the program statements defined in the trigger.Second, createThe for every

MySQL Foundation II

First, view:1, view definition: View is the result of the mapping of physical table, physical table change, view definitely change.create view v_name as select 列名(也可以是函数计算出来的结果如 avg()) from 表;2, the role of the view:2.1. Permission controlFor

About MySQL foreign key

First of all, we must first clarify the role of MySQL external inspection, in fact, is very simple, is to establish the main table and from the table mandatory constraints.Look at an example:To create the main table:create table class (

Binary installation MySQL

The binary format is installed in the following ways:1. Query the local installation of MySQL database related packages (uninstall) Rpm-qa "mysql*" (CENTOS6) Rpm-qa "mariadb*" (CETOS7) 2. mariadb.org Download the source binary package with the Linux

MySQL Basic five Cursors

first, the definition of the cursor:CREATE PROCEDURE P12 ()BeginDECLARE row_name varchar (20);declare row_num int;Declare mycursor cursor FOR select Name,num from goods;//defining cursors MyCursorOpen mycursor;//cursor MyCursorFetch mycursor into

MySQL Setup self-increment field

1, MySQL each table can only have 1 self-increment field, this self-increment field can be used as the primary key, also can use as a non-primary key, but note that the self-increment field as a non-primary key to use must be added a unique index,

MySQL Index optimization 1

Btree Index and Hash Index (index is a data structure that improves query, sorting, grouping speed) Btree index data structure is balanced binary tree, time complexity of LGN Hash index data structure is a hash function, time complexity

CentOS 7 Source code compilation mysql-5.6.37

1.1 Installation DependenciesYum Install Ncurses-devel libaio-devel-yRpm-qa Ncurses-devel Libaio-devel1.2 Installing CMakeYum Install Cmake-yRpm-qa CMake1.3 Creating a MySQL UserUseradd-s/sbin/nologin-m MySQLID MySQL1.4 Download/Unzip the source

"MySQL optimization" index overlay

Index Overridesmeans that if the column of the query is exactly part of the index, then the query needs to be done only on the index file, without having to go back to the disk and find the data. This query is very fast, called "Index overlay", less

MySQL II: library operations

First, the 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,

Common MySQL error codes and codes

Common MySQL error codes and codes MySQL common error code and code Description   1005: An error occurred while creating the table. 1006: database creation failed 1007: the database already exists. An error occurred while creating the database. 1008:

Mysql index,

Mysql index, Index name: you can create an index on multiple columns. This index is called composite index (Composite Index) (composite index) I. Create an indexCreate table t1 (id int primary key, username varchar (20), password varchar (20

Reprinted -- MYSQL5.7: Access denied for user & #39; root & #39; @ & #39; localhost & #39; (using password: YES) solution, -- mysql5.7denied

Reprinted -- MYSQL5.7: Access denied for user 'root' @ 'localhost' (using password: YES) solution, -- mysql5.7denied 1. Open the my. ini file in the MySQL directory, add "skip-grant-tables" at the end of the file, and save and close the file; 2.

MySQL database index Overview

MySQL database index OverviewI. Meanings and features of indexes are independent and stored on disks.Database StructureThey includeReference pointer of all records in the data table. The index is used to quickly find rows with a special value in one

Total Pages: 3233 1 .... 2597 2598 2599 2600 2601 .... 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.