First give me my core point of view: learning, no matter what you are studying, and whether you have a foundation or not. Thinking always comes first. It doesn’t matter if you have never been exposed to some knowledge. There is no need to be afraid, and there is no need to be afraid. The important thing is not to stop thinking for a second, and to think through the problem thoroughly. As the saying goes, sharpening the knife will not waste time cutting wood. Especially as an engineer, you must have the spirit to break the casserole and get to the bottom of it, otherwise it will be useless no matter what you learn.
Recommended courses: MySQL Tutorial.
First, give an overview of the knowledge system of mysql:
Basics:
sql statement table structure design and optimization :
Index, slow query optimization configuration parameter tuning
Core principle:
InnoDb storage engine (including isolation level, transaction, lock, cache Pool, rollback log, etc.)
Mysqld (including connection management, process management, query cache, query optimization, logs, etc.)
Architecture and operation and maintenance:
Users and Permissions, Security
Backup and Recovery
Log Distribution and High Availability
For zero-based children’s shoes:
First, learn basic SQL syntax. After completing this, you can write SQL statements.
Recommended for this step: W3Schools’ SQL tutorial.
Secondly, learn the main functions and usage of the database, such as user-related or permission-related, etc.
I recommend two books: 1. "You Must Know MySQL" This book is very comprehensive, from basic concepts to querying to inserting new tables and user management, with specific examples. It is very suitable for students without any foundation to learn Mysql. In short, the method of learning this book is: 1. Understand the basic concepts of databases in ten minutes 2. Find a database to practice on 3. Compare the above content to type. There is also a lot of content about SQL in this book, which can be read in conjunction with W3C's SQL tutorial.
2. The book "Database System Concepts" is a must-read for DBAs.
After reading these and practicing and thinking, you can get started.
Next, I recommend a few books for children who want to learn in depth (many experts recommend this), "High-Performance MySQL (3rd Edition)", "MySQL Technology Insider (4th Edition)", " MySQL Technology Insider InnoDB Storage Engine", "In-depth Understanding of MySQL" and the official website of MySQL. After reading these things and adding some rich experience, theoretically speaking, you will have the level of DBA.
It is highly recommended to read the blogs summarized on Planet MySQL, especially Percona's MySQL & InnoDB performance and scalability blog. However, as I said at the beginning. Be sure to think positively when facing problems!
For example: Let me ask you, in the face of a scenario with relatively high concurrency, how to configure the number of mysql connections?
You may answer: "Oh, just increase the value of max_connection."
Then, have you ever thought about how much is the most appropriate value? Why is this setting the most appropriate?
Maybe you will answer: "Well, I know, you can look at the system's previous value of max_used_connection, and then set it. You can also increase the value of back_log."
Have you ever thought about it? , what adverse effects will there be if the max_connection number of connections is too high? What are the disadvantages of setting back_log too high? The upper limit of max_connect actually depends on the number of file descriptors that mysql can obtain. That is to say, even if you set it to 10000, it will be useless in the end. The system will automatically lower it according to the machine conditions.
Maybe you will answer: "Well, I know that if the setting is too high, there will be system overhead..."
Then have you ever thought about what exactly these overheads are? What job requires this memory overhead?
Maybe you will also answer that when the connection is created, the connection buffer and query buffer will be allocated to it immediately, which will eat up memory.
Have you ever thought about how much resources it occupies? What factors does it depend on? Okay, let's end this issue first. Back to the question on Zhihu, in fact, what I said so much is to express how to learn MySQL by myself. Therefore, you must keep thinking so that when faced with specific scenarios at work, you can calmly infer: "Oh, there must be something wrong here. What should be done."
Facing the problem , come up with the spirit of breaking the casserole and asking the truth, think about it first, give your own assumptions, don't rush to find Du Niang, Google. After thinking about it, go search boldly with your inferences or answers! Go read other people’s opinions and read the official description! This is the attitude an engineer should have.
Finally I would like to give some valuable learning materials.
It can save some time. -E-books: I think reading more books is still beneficial. Some books are worth reading many times. Sometimes, reading them only once cannot fully understand and absorb them, and the thinking is not enough.
"Must Know MySQL" "High-Performance MySQL Third Edition" "Database System Concepts" "In-depth Understanding of MySQL" "MySQL Performance Tuning and Architecture Design-Full Volume" "SQL Antipatterns" "MySQL Technology Insider InnoDB Storage Engine》
-Website for learning mysql: MySQL Tutorial - Learn MySQL Fast, Easy and Fun. You can learn MySQL quickly, easily and interestingly. A complete MySQL tutorial is provided to you in a simple and easy-to-understand manner. Each tutorial has practical examples of SQL scripts and screenshots available.
mysql study materials | mysql in-depth study notes In-depth notes have a lot of mysql materials to read, and you can also read study notes made by netizens. W3Schools SQL tutorial can learn basic sql statements
-Read the official manual
No matter whether your English is good or not, the ability to read English manuals must be acquired and cultivated of.
mysql official manual: 14 The InnoDB Storage Engine - Daniel's blog The blogs of experts in the field are very valuable for learning. Here are a few of the better ones:
He Dengcheng's technical blog He Dengcheng Technology Blog
Taobao Dingqi Zhuifeng Dao·Dingqi-ITeye Technology Website
zhou Zhenxing@Taobao Flower Name: Su Pu A Story@MySQL DBA
Alibaba Cloud Senior database expert Peng Lixun is a formal member of the MariaDB Foundation and is responsible for reviewing patches related to the global Replication module. Peng Lixun also became the first Chinese programmer introduced by the MariaDB Foundation. P.Linux Laboratory
Planet MySQL
Finally, use it more.
The above is the detailed content of How to learn mysql by yourself with zero foundation. For more information, please follow other related articles on the PHP Chinese website!