2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
There is no official plugin for MySQL in CentOS 9 because MySQL is not the default database for CentOS, it is a part of MariaDB.
If you want a command line MySQL client, you can use a third-party tool such as mycli
First, make sure MySQL has been installed and the operating system is centos9.
CentOS 9 usually comes with Python 3 pre-installed, which can be installed using pip
[root@localhost ~]# pip install mycli
bash: pip: 未找到命令...
Continue to wait, the system will prompt whether to install pip, enter y
安装软件包“python3-pip”以提供命令“pip”? [N/y] y
Continue typing y
下列软件包必须安装:
python3-pip-21.3.1-1.el9.noarch A tool for installing and managing Python3 packages
继续更改? [N/y] y
As shown in the figure:
Wait for the progress bar to fill up
grammar:
mycli -h 地址 -u 用户名 -p'密码'
like:
mycli -uroot -p'ChenFuguo*****';
When prompted, press the up and down keys on the keyboard to select the prompt content.
The prompt content turns black to indicate that it is selected, and you can complete it by pressing Enter.