<aside> 📎 Configure the Essential database on MySQL

</aside>

export MAINDB="EssentialAM"
export DBUSER="essential"
export DBPASS="%%% sensible pwd here %%%"
sudo mysql -e "CREATE DATABASE IF NOT EXISTS ${MAINDB} /*\\!40100 DEFAULT CHARACTER SET utf8 */;"
sudo mysql -e "CREATE USER IF NOT EXISTS ${DBUSER}@'%' IDENTIFIED BY '${DBPASS}';"
sudo mysql -e "GRANT ALL PRIVILEGES ON ${MAINDB}.* TO '${DBUSER}'@'%';"
sudo mysql -e "CREATE USER IF NOT EXISTS ${DBUSER}@'localhost' IDENTIFIED BY '${DBPASS}';"
sudo mysql -e "GRANT ALL PRIVILEGES ON ${MAINDB}.* TO '${DBUSER}'@'localhost';"
sudo mysql -e "FLUSH PRIVILEGES;"
 
#allow binding on all IP addresses
sudo cat /etc/mysql/mysql.conf.d/mysqld.cnf | sed -e "s/bind-address.*/bind-address=0.0.0.0/g" > mysqld_new.cnf
sudo cp mysqld_new.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
 
sudo mysql --one-database ${MAINDB}  <  EssentialProjectEAM_LinuxCLI-master/EARepo_backup.sql

Check the database configuration:

mysql -u essential -p
Enter password: 

# We

mysql> use EssentialAM
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------------+
| Tables_in_EssentialAM |
+-----------------------+
| Annotation            |
| Repository            |
+-----------------------+
2 rows in set (0.00 sec)

mysql>

Next:

<aside> â„šī¸ Information on this page is based on https://github.com/johnpwhite/EssentialProjectEAM_LinuxCLI

</aside>

2. Install software packages