Database Online Training Platform-MySQL

Introduction: remember a training process of MySQL online platform

What was written in the front: Since the Programmers’ Day hits hard, the top ten database leaders have a peak dialogue, top celebrities gather in Changsha again, hard core technology + open source culture + big celebrities gather to talk about the new era of digital computing——Changsha·China 1024 Programmer's Day

It can be seen that database system technology occupies a vital position in all walks of life, especially more and more enterprise-level open source databases are pouring in - surging, traditional database systems (DBMS) like Oracle and MySQL have also been It is a powerful database tool that we, as developers, must know and master.

In this 1024 programmer festival, I wish all programmers a happy holiday, pay attention to rest, after all, there is still a lot of code to code!

It is true that good things need to be shared, from recording an actual scene in April - the adaptation and landing process of the domestic database Dameng, to the first [Story of Me and Dameng] held by Dameng Database and Motianlun in September Essay Contest - Writing:

From the real scene cases, it leads to further understanding of the database, and it is precisely because of this that database engineers obtain certification. Indeed, thinking determines action, constantly strengthening self-motivation, sometimes it is such a simple pursuit of a favorite thing, one stroke of effort, one stroke of harvest. Difficult challenges encountered in life and work can not only temper our will, but also new things can expand our knowledge and broaden our horizons. Just like calligraphy, "the heart is upright and the pen is upright"; like a sailing ship, "the way is smooth sailing"; just like the ancient saying, "although it is hard work to scouring thousands of times, you can only get gold by blowing the wild sand"!

Therefore, on this 1024 Programmer's Day, I also share with you children's shoes and friends the online database training platform . When we are still unfamiliar with the database or just want to learn about database technology, when we do related work through the database after school, if we are still confused and troubled by the construction of environmental resources, we may as well join the database online training platform . Recently, at the invitation of Motianlun (database technology community), I also shared the database online training platform . The current cloud resources include our daily development and major database systems commonly used in our work-relational database & non-relational database. , very practical, recommended><

First of all, we can choose the MySQL database on the database online training platform, which currently supports six types of databases: Oracle, MySQL, Redis, PostgreSQL, openGauss and MogDB.

https://www.modb.pro/marketlist?type=1

Next, connect to the MySQL database online, version V8.0,

Next, click to enter the MySQL training environment, 

Enter the commands separately,

# can view all databases

mysql>show databases;

# You can view the current process of the database, and you can check whether there are slow SQL record threads being executed

mysql>show processlist;

Note: For more details on initializing Sample Schemas - create database > table structure > insert data in batches, just refer to the case on the left above, which will not be described in detail here.

https://docs.oracle.com/database/121/COMSC/installation.htm#COMSC00002

# View all transactions currently running in the database

mysql>select * from information_schema.innodb_trx;

# View current locks

mysql>select * from information_schema.innodb_locks;

# View the corresponding relationship of lock waiting

mysql>select * from information_schema.innodb_lock_waits;

# Delete transactions in the transaction table in batches, the way used here:

Use the connection information in the information_schema.processlist table to generate a temporary statement file for the MySQL connection that needs to be disposed, and then execute the instructions generated in the temporary file.

mysql> select concat('KILL ',id,';') from information_schema.processlist p inner->join information_schema.INNODB_TRX x on p.id=x.trx_mysql_thread_id where db='yd_pro';

If it exists as follows:

+------------------------+| concat('KILL ',id,';') |+------------------------+| KILL 1402121;          |+------------------------+1 row in set (0.01 sec)

Then execute the command,

mysql> KILL 1402121;Query OK, 0 rows affected (0.00 sec)

# View all transactions currently running in the database

mysql> SELECT * FROM information_schema.INNODB_TRX;Empty set (0.01 sec)

Note: The above MySQL transactions and status, locks and locks are waiting to be checked. In our actual project work, it is also very important to solve abnormalities such as transactions and deadlocks!

Guess you like

Origin blog.csdn.net/yxd179/article/details/120932326