要在Linux上部署MySQL數據庫,您可以按照以下步驟進行操作:
sudo apt-get update
sudo apt-get install mysql-server
sudo systemctl start mysql
sudo mysql_secure_installation
mysql -u root -p
CREATE DATABASE mydatabase;
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword';
GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'localhost';
FLUSH PRIVILEGES;
exit
通過以上步驟,您就可以在Linux上成功部署MySQL數據庫并進行相應的設置和管理。