When users install MySQL database for the first time, they always want to change the initial root password. I do the same and always search on Baidu. Here are some commonly used SQL for operating database and some basic concepts. Modify the user's initial password: SET PASSWORD = PASSWORD('your new password'); ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; flush privileges; Create a new user: CREATE USER 'username'@'host' IDENTIFIED BY 'password'; Grant permissions to the user: GRANT all privileges ON databasename.tablename TO 'username'@'host'; flush privileges; To set and change your password: SET PASSWORD FOR 'username'@'host' = PASSWORD('password'); Revoke permissions: REVOKE privilege ON databasename.tablename FROM 'username'@'host'; To delete a user: DROP USER 'username'@'host'; View the user's authorization: SHOW grants for 'username'@'host'; The Innodb engine provides support for ACID transactions:
MYSQL isolation level: Dirty read: allows reading of uncommitted dirty data. Non-repeatable read: Some records are read at point T1. When these records are read again at point T2, these records may have been changed or disappeared. MYSQL locking mechanism: The locking mechanism is a rule set by the database to ensure the consistency of the database and make various shared resources orderly when being accessed concurrently.
The most granular locking mechanism. Deadlock is not likely to occur, but the probability of resource competition is higher. Table-level locking is mainly used in some non-transactional storage engines such as MyISAM, Memory, and CSV. Row-level locking is mainly used in Innodb and NDBCluster storage engines. Page-level locking is mainly used in BerkeleyDB. The above is the method of changing the user's initial password in MySQL 5.7 that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: More than 100 lines of code to implement react drag hooks
>>: Linux kernel device driver system call notes
Preface A classmate is investigating MLSQL Stack&...
1. Download the required kernel version 2. Upload...
<a href="https://www.jb51.net/" titl...
1. Cleaning before installation rpm -qa | grep jd...
Overview Prometheus is an open source service mon...
Preface Let me explain here first. Many people on...
0x0 Test Environment The headquarters production ...
Table of contents What is pre-analysis? The diffe...
GNU Parallel is a shell tool for executing comput...
1. Installation steps for MySQL 8.0.12 version. 1...
Table of contents 1. Install JDK Manual Installat...
This article uses examples to illustrate the tabl...
1. Introduction The EXPLAIN statement provides in...
Table of contents Question: Case (1) fork before ...
123WORDPRESS.COM has explained to you the install...