"Original" https://www.toutiao.com/i6594314336913588743/How MySQL handles billions of data, the first phase-optimizing SQL statements1. Try to avoid using the! = or <> operator in the WHERE clause, or discard the engine for a full table scan using
Objective
Although the system currently only supports MSSQL version, but many friends of the company technical rules must use MySQL, let's use EF to connect MySQL!
(1) Install the MySQL environment 1. Download and install MySQL data, here we
Note: (MySQL database is not case-sensitive, but the symbol must be in English format)View User commands:select user,authentication_string,host from user;Create user command one, directly created:create user ' zhangsan ' @ ' localhost ' identified
Delete the wrong user table root can not even go up, and then we can understand the root password do not know, forget. Use this method to retrieve root and recreate the deleted user. Fortunately not on the line ... 1. Modify the login settings for
To make a date backup of each table in the MySQL database, the idea is to take out the table name of each table first, and then use the For loop to back up each table by date[email protected]0-171 backup]# vim dataname.txt
MySQL import data appears the MySQL server is running with the--SECURE-FILE-PRIV option so it cannot execute this statementMethod One:This is actually very simple because the import and export directory permissions are limited when MySQL is
Problem Description:when installing MySQL, the second reload can be a strange situation if the first installation is not successful. Through some attempts, it was found that the main reason for installing the previous tutorials was that the first
MySQL concurrency update common scenarios optimistic lockselect * from tab1 where id = ?;update tab1 set col1 = ? where id = ? and version = ?;
Disadvantages
May fail to update under high concurrency, so need to retry
1. Operation of the database remember to add a semicolon [;] End CREATE DATABASE [DB name]; Drop databse [database name];use [database name]; Select Database//2. The Operation//field name of the data table is ID, name, age these ...//unsigned
Operation of JSON dataCREATE TABLE IF not EXISTS Table_json (id BIGINT auto_increment,json json,primary KEY (id)); ALTER TABLE Table_json Add COLUMN name VARCHAR (GENERATED) always as (Json_extract (JSON, "$.name")) virtual; ALTER TABLE Table_json
MySQL forgot the super user admin password, can take advantage of restarting the MySQL process with the--skip-grant-tables parameter to start the database, and a blank password login. This is the equivalent of the first time the database was started.
1, install the service sidesudo apt-get install Mysql-server2. Install the Clientsudo apt-get install mysql-client3. Ubuntu installation Software1. sudo apt-get updateAccess each URL in the source list, read the software list, save to
After the MySQL database is familiar and installed, the basic operations of the database are described below, and all of the following database statements are executed in the "mysql>" operating environment.First, MySQL---additions and deletions to
Select Database_name,max (last_update) from Mysql.innodb_table_stats GROUP by database_name;SELECTTABLE_NAME,Update_timeFromInformation_schema. TABLESWHERETable_schema = ' database name ';SizeSelect table_name, concat (Truncate (data_length/1024/1024
Creating views: Create View name [(column name 1, column Name 2, ... )] As a complex SELECT statement; View using: SELECT * from view name where Condition order by ..... Modify view: Alter VIEW name [(column name 1, column Name 2, ... )] AS SELECT
After registering, you can click to see who's phone is similar to mine.When registering, there are three required fields, namely, user name, password and phone number. Telephone requirements must be number.After registering for a 1111 phone, click
Article transferred from https://www.cnblogs.com/mujingyu/p/7689116.htmlQuestion 1:my-default.cnfNotice 5.7.23 no my-default.cnf.CNF file Template[MySQL]# Set the MySQL client default character
MySQL's engine:InnoDB: Features a row lock design, supports foreign keys, and supports non-locking reads similar to Oracle, where the default read operation does not generate locks. The default storage engine above mysql5.5.8MyISAM: Does not support
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