Skip to content

Instantly share code, notes, and snippets.

@kurtisdunn
Last active February 18, 2022 23:52
Show Gist options
  • Save kurtisdunn/878da3ef87bffc8e5a8c84d51a69b05f to your computer and use it in GitHub Desktop.
Save kurtisdunn/878da3ef87bffc8e5a8c84d51a69b05f to your computer and use it in GitHub Desktop.
Install MariaDB on AWS Linux

Install MariaDB on AWS Linux

Create the MariaDB yum repository for v10.3

sudo vi /etc/yum.repos.d/MariaDB.repo

And paste in the following:

#MariaDB 10.3 CentOS repository list
#http://downloads.mariadb.org/mariadb/repositories/ 
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Install Nginx, PHP-FPM and MariaDB

sudo yum install -y MariaDB-server MariaDB-client

Run the install

mysql_secure_install

Give User PRIVILEGES on a given DB.

CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass';
GRANT ALL PRIVILEGES ON `newdb`.* TO 'myuser'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'pass' WITH GRANT OPTION
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment