Home Common Problem How to learn mysql by yourself with zero foundation

How to learn mysql by yourself with zero foundation

May 10, 2019 am 09:25 AM
mysql

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.

How to learn mysql by yourself with zero foundation

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:

How to learn mysql by yourself with zero foundation

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1582
276
How to use check constraints to enforce data rules in MySQL? How to use check constraints to enforce data rules in MySQL? Aug 06, 2025 pm 04:49 PM

MySQL supports CHECK constraints to force domain integrity, effective from version 8.0.16; 1. Add constraints when creating a table: Use CREATETABLE to define CHECK conditions, such as age ≥18, salary > 0, department limit values; 2. Modify the table to add constraints: Use ALTERTABLEADDCONSTRAINT to limit field values, such as name non-empty; 3. Use complex conditions: support multi-column logic and expressions, such as end date ≥start date and completion status must have an end date; 4. Delete constraints: use ALTERTABLEDROPCONSTRAINT to specify the name to delete; 5. Notes: MySQL8.0.16, InnoDB or MyISAM needs to be quoted

How to show all databases in MySQL How to show all databases in MySQL Aug 08, 2025 am 09:50 AM

To display all databases in MySQL, you need to use the SHOWDATABASES command; 1. After logging into the MySQL server, you can execute the SHOWDATABASES; command to list all databases that the current user has permission to access; 2. System databases such as information_schema, mysql, performance_schema and sys exist by default, but users with insufficient permissions may not be able to see it; 3. You can also query and filter the database through SELECTSCHEMA_NAMEFROMinformation_schema.SCHEMATA; for example, excluding the system database to only display the database created by users; make sure to use

How to Troubleshoot Common MySQL Connection Errors? How to Troubleshoot Common MySQL Connection Errors? Aug 08, 2025 am 06:44 AM

Check whether the MySQL service is running, use sudosystemctlstatusmysql to confirm and start; 2. Make sure that bind-address is set to 0.0.0.0 to allow remote connections and restart the service; 3. Verify whether the 3306 port is open, check and configure the firewall rules to allow the port; 4. For the "Accessdenied" error, you need to check the user name, password and host name, and then log in to MySQL and query the mysql.user table to confirm permissions. If necessary, create or update the user and authorize it, such as using 'your_user'@'%'; 5. If authentication is lost due to caching_sha2_password

How to add a primary key to an existing table in MySQL? How to add a primary key to an existing table in MySQL? Aug 12, 2025 am 04:11 AM

To add a primary key to an existing table, use the ALTERTABLE statement with the ADDPRIMARYKEY clause. 1. Ensure that the target column has no NULL value, no duplication and is defined as NOTNULL; 2. The single-column primary key syntax is ALTERTABLE table name ADDPRIMARYKEY (column name); 3. The multi-column combination primary key syntax is ALTERTABLE table name ADDPRIMARYKEY (column 1, column 2); 4. If the column allows NULL, you must first execute MODIFY to set NOTNULL; 5. Each table can only have one primary key, and the old primary key must be deleted before adding; 6. If you need to increase it yourself, you can use MODIFY to set AUTO_INCREMENT. Ensure data before operation

What is the difference between TRUNCATE, DELETE, and DROP in MySQL? What is the difference between TRUNCATE, DELETE, and DROP in MySQL? Aug 05, 2025 am 09:39 AM

DELETEremovesspecificorallrows,keepstablestructure,allowsrollbackandtriggers,anddoesnotresetauto-increment;2.TRUNCATEquicklyremovesallrows,resetsauto-increment,cannotberolledbackinmostcases,doesnotfiretriggers,andkeepstablestructure;3.DROPremovesthee

How to back up a database in MySQL How to back up a database in MySQL Aug 11, 2025 am 10:40 AM

Using mysqldump is the most common and effective way to back up MySQL databases. It can generate SQL scripts containing table structure and data. 1. The basic syntax is: mysqldump-u[user name]-p[database name]>backup_file.sql. After execution, enter the password to generate a backup file. 2. Back up multiple databases with --databases option: mysqldump-uroot-p--databasesdb1db2>multiple_dbs_backup.sql. 3. Back up all databases with --all-databases: mysqldump-uroot-p

Optimizing MySQL for Customer Relationship Management (CRM) Optimizing MySQL for Customer Relationship Management (CRM) Aug 06, 2025 pm 06:04 PM

TooptimizeMySQLperformanceforaCRMsystem,focusonindexingstrategies,schemadesignbalance,andqueryefficiency.1)Useproperindexingbyanalyzingfrequentqueries,addingindexesonWHEREclausecolumns,JOINkeys,andORDERBYfields,andconsideringcompositeindexeswheremult

How to use the IN operator in MySQL? How to use the IN operator in MySQL? Aug 12, 2025 pm 03:46 PM

TheINoperatorinMySQLchecksifavaluematchesanyinaspecifiedlist,simplifyingmultipleORconditions;itworkswithliterals,strings,dates,andsubqueries,improvesqueryreadability,performswellonindexedcolumns,supportsNOTIN(withcautionforNULLs),andcanbecombinedwith