📜  安装 mysql 8 linux - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:22.489000             🧑  作者: Mango

代码示例1
Step 1: Update/Upgrade Package Repository

sudo apt update

Step 2: Install MySQL

sudo apt install mysql-server
mysql --version

Step 3: Securing MySQL

sudo mysql_secure_installation
type y and 1 and enter a strong password 
and answer y for rest of questions 

Step 4: Check if MySQL Service Is Running
sudo systemctl status mysql

you must see active as a status

Step 5: Log in to MySQL Server
sudo mysql -u root