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
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,
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
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
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
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
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
The ideal Index
Frequent queries
High degree of differentiation
Small length
Try to overwrite common query fields
Indexing and sorting
When querying directly on an index for overwriting an index, there is a
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
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
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,
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 '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 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
MySQL common storage engine introduction and parameter settings tuning, mysql Tuning
MyISAM
Features:1. Concurrency and lock level2. Repair of Table CorruptionCheck table tablenameRepair table tablename3. Index types supported by MyISAM tables①
MySQL series-Chapter 1: MySQL introduction and installation, mysql Chapter 11. Database Introduction1. What is Database? ''
Simply put, a data warehouse is organized and stored according to a certain data structure , we can use a variety of methods
[Daily] MySQL memory failure solution, mysql Solution
1. Failed to start mysql. Check the error log/var/log/mysql/error. log.
2. The main error messages are as follows:
[ERROR] InnoDB: mmap (136151040 bytes) failed; errno 12 [ERROR] InnoDB:
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