Project

General

Profile

Support #945

Updated by Daniel Curtis almost 6 years ago

{{>toc}} 

 This is a simple guide on setting up a MariaDB 10 server on Arch Linux. FreeBSD 10. 

 h2. Prepare the Environment 

 * Make sure the system is up to date: 
 <pre> 
 pacman -Syu 
 </pre> 

 h2. Install MariaDB server 

 * Start by installing the mariadb server and mariadb-clients packages: 
 <pre> 
 pacman -S mariadb{,-clients} 
 </pre> 

 * Initialize the database: 
 <pre> 
 mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql 
 </pre> 

 * Enable and start MariaDB 
 <pre> 
 systemctl enable mariadb 
 systemctl start mariadb 
 </pre> 

 * Prepare the database for use by running the secure installation: 
 <pre> 
 mysql_secure_installation 
 </pre> 
 #* *NOTE*: +Choose a strong root password+ and answer +yes+ to all questions. 

 h3. Create MariaDB Databases and Users 

 * Login to MariaDB and create appropriate databases and users. 
 <pre> 
 mysql -u root -p 
 </pre> 
 #* and run the following SQL queries to create the *somedb* database and *someuser* user: 
 <pre> 
 CREATE DATABASE somedb CHARACTER SET utf8; 

 CREATE USER 'someuser'@'localhost' IDENTIFIED BY 'SuperSecretPassword'; 

 GRANT ALL PRIVILEGES ON somedb.* TO 'someuser'@'localhost'; 

 FLUSH PRIVILEGES; 

 quit 
 </pre>

Back