server-debian/mysql/mysql_wordpress.sh

17 lines
326 B
Bash
Raw Normal View History

2023-07-18 16:20:48 +02:00
# mysql
apt-get install -y \
mysql-server
systemctl start mysql.service
mysql_secure_installation
systemctl status mysql.service
mysql -u root
```sql
CREATE DATABASE wp;
2023-10-20 13:40:58 +02:00
CREATE USER 'db_admin'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD';
2023-07-18 16:20:48 +02:00
GRANT ALL PRIVILEGES ON wp.* TO 'db_admin'@'localhost';
FLUSH PRIVILEGES;
EXIT;
```