Ubuntu MySQL setup notes
Posted: Wed Dec 29, 2021 3:17 pm
I thought I'd post this here as when I first went to test Unimus, I had to delay my initial setup a bit because I didn't want to use a file-level database, but I also wasn't familiar enough with the database setup process to be sure that I knew what I was doing.
I'm still not, but in case it's useful to anyone else, here are my steps for quickly getting a MySQL DB installed on Ubuntu 20.04 for use with Unimus.
Probabably not perfect, but it works!
I'm still not, but in case it's useful to anyone else, here are my steps for quickly getting a MySQL DB installed on Ubuntu 20.04 for use with Unimus.
Code: Select all
using very good digitalocean guides on mysql
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/a-basic-mysql-tutorial
# apt-get update
# apt-get install mysql-server
mysqld will log errors to /var/log/mysql/error.log
# /usr/bin/mysql_secure_installation
Validate password component: Y
Strength: 2 (strong)
set root password
remove anonymous users: Y
disllow root login remotely: Y
remove testdb: Y
reload privilege tables: Y
run 'mysql' as root user so that it autenticates via auth_socket (better alterantive to "mysql - u root -p")
# mysql
> SHOW DATABASES;
> CREATE DATABASE unimus;
> CREATE USER 'unimusdb_user'@'localhost' IDENTIFIED BY '<db_password>';
> GRANT ALL PRIVILEGES ON unimus.* TO 'unimusdb_user'@'localhost';
\q
Then in the Unimus web setup
db: mysql
host: localhost
database name: unimus
database user: unimusdb_user
database password: as above
Don't forget other database best practises such as housekeeping and backup!