Note: This article is for mac!! only ProblemAfter installing MySQL successfully, want to get a database to try, but error. Not an error code, but a piece of code:Authentication plugin ‘caching_sha2_password‘ cannot be loaded: dlopen(/usr/local/mysql/
Create a new test table, three fields, Id,title,uid, ID is the self-increment primary key, UID is the unique index;Insert two piece of data insert into test (TITLE,UID) values ( ' 123465" 1001 "insert into test (TITLE,UID) values ( ' 123465" 1002
I used MySQL to know that she had a good function of group_concat function, which is very convenient.Click (here) to collapse or open
SELECT
*
From
Group_test;
SELECT
Id
Group_concat (sub_id)
From
'
Foreword: Meet such a demand, have a result, the result only records the student's score, now needs to statistic student's grade, 100-90 divides into excellent, 90-60 divides into passes, 60-0 divides into the failure. This requirement can be
Left outer connection: (Based on left table)When two tables are connected, the connection conditions do not match.Leave the data in the left table, and the data in the right table is filled with nullExample: Use the left link to take the student's
MySQL advanced queryAdvanced QueryKeyword Write order keyword execution orderSelect: Projection Results 1 5From: Navigate to Table 2 1Where: First filter before grouping 3 2GROUP BY: Group 4 3Having: Second filter after grouping 5 4ORDER BY: Sort 6 6
Upgrade Phpstudy MySQL version to 5.7.17 because the local integration environment is Phpstudy 2016, the option to upgrade the MySQL version is not found, so upgrade yourself. Download the high version of mysql:https://dev.mysql.com/downloads/file/?
MHA is currently a relatively mature solution for MySQL high availability, developed by the Japanese Dena company Youshimaton, and is an excellent set of highly available software for failover and master-slave upgrading in MySQL high-availability
[SQL]View PlainCopyPrint?
explain Select * from user
Explain select * from user[SQL]View PlainCopyPrint?
Explain extended Select * from user
Explain extended select * from user
Id
Select
Execution path of the query
SQL statements
Query cache
Parser
Parse tree
Pretreatment
Find the best query path
Query optimization SQL statements
Execution plan
API call Storage Engine
Call data, return
Learning Goals
Data backup
Data recovery
Database migration
Import and Export
Data backupA system crash or server hardware corruption can cause the database to be lost, so data backup is important in a production
1) Scene catch the slow query statement show full processlist;2) configuration parameters:Slow_query_log_file = On slow query open switchlong_query_time = 2 record SQL statement greater than 2 secondsLog_queries_not_using_indexes = on does not use
1, what is data? The symbolic records describing things are called data, and the symbols describing things can be either numbers or text, pictures, images, sounds, languages, etc., and the data is represented by many forms.They can all be digitized
01What are the common relational database and non-relational types? 1. Relational databases use foreign key associations to establish a table-to-table relationship---------Common: SQLite, Oracle, MySQL2. A non-relational database usually means that
The basic process of a database is to see what libraries are in your database: show databases;Then go to the corresponding library to operate: Use+ Enter the library/table switch pathTo view all the tables in this library: Show Tabales;View all of
group replication for MySQL Let's talk about the various forms of database replicationAsynchronous Replication Mode , the transaction generated binlog,slave on Master is received on the local relaylog by connecting the contents of master Fetch
Pooling: Whether to use thread pool, default TrueMinimumpoolsize, min Pool size: The minimum number of threads allowed in the thread pool, default 0Maximumpoolsize,max Pool Size: The maximum number of threads allowed in a thread pool, default
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