Update Section_06/mysql.sh, Section_06/commands.sql, Section_06/redis.sh
This commit is contained in:
parent
9aeeffff9f
commit
f96755e09d
5
Section_06/commands.sql
Normal file
5
Section_06/commands.sql
Normal file
@ -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
|
17
Section_06/mysql.sh
Normal file
17
Section_06/mysql.sh
Normal file
@ -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
|
11
Section_06/redis.sh
Normal file
11
Section_06/redis.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user