在Ubuntu中安裝MySQL的步驟如下:
sudo apt update
sudo apt install mysql-server
sudo systemctl status mysql
sudo mysql_secure_installation
sudo mysql -u root -p
CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE new_database;
GRANT ALL PRIVILEGES ON new_database.* TO 'new_user'@'localhost';
FLUSH PRIVILEGES;
這樣,您就成功在Ubuntu中安裝和配置了MySQL服務器。