Mysql server install

Before you setup mariadb - ensure your system is fully updated - reboot if kernel has been synced

sudo pacman -Syu
  1. Switch to root account

    su -l root
    
  2. installation

    pacman -S mariadb mysql-workbench
    
  3. setup the system database

    mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    
  4. enable and start the service

    systemctl enable --now mysql
    
  5. harden install (part of this is denying root login)

    mysql_secure_installation
    
  6. create a user (example from wiki) - to create a sysadmin like user change mydb.* to *.*

    # mysql -u root -p
    
    MariaDB> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
    MariaDB> GRANT ALL PRIVILEGES ON mydb.* TO 'monty'@'localhost';
    MariaDB> FLUSH PRIVILEGES;
    MariaDB> quit
    
  7. switch out of the root account

    exit
    

Done

Since Mariadb reports database v10 - Mysql Workbench will complain as the version is newer than anything it knows of - this shouldn’t matter.

This is a missing keyring

This is not needed for mariadb. This is only needed for building mysql from AUR - and the requirements are usually fetched automagically by pamac.

1 Like