diff --git a/Section_06/commands.sql b/Section_06/commands.sql new file mode 100644 index 0000000..b5ab0ba --- /dev/null +++ b/Section_06/commands.sql @@ -0,0 +1,5 @@ +CREATE USER 'test_user' IDENTIFIED BY 'test'; +CREATE DATABASE test_dev; +GRANT ALL ON test_dev.* TO 'test_user'@localhost IDENTIFIED BY 'test'; +FLUSH PRIVILEGES; +exit diff --git a/Section_06/mysql.sh b/Section_06/mysql.sh new file mode 100644 index 0000000..b2acd2c --- /dev/null +++ b/Section_06/mysql.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# MySQL 5.7 +wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb +sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb +sudo apt update +sudo apt install -y mysql-server mysql-client +sudo apt-mark hold mysql-c* mysql-s* mariadb-* +sudo systemctl enable mysql --now + +# MariaDB +sudo apt install mariadb-server +sudo mysql_secure_installation +sudo apt-mark hold mysql-c* mysql-s* mariadb-* +sudo systemctl enable mariadb --now + +mysql -uroot -ptest diff --git a/Section_06/redis.sh b/Section_06/redis.sh new file mode 100644 index 0000000..f7c55a6 --- /dev/null +++ b/Section_06/redis.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +sudo apt install redis-server + +# Switch supervised to systemd +sudo nano /etc/redis/redis.conf +sudo systemctl restart redis +redis-cli + +# set test "Hello world!" +# get test