Next we will log in to MariaDB to create the diaspora user. When prompted, enter the root password you created above:
mysql -u root -p
Create a user for Diaspora. Change password in the command below to a real password. This should not be the same as the root password you provided during mysql_secure_installation.
CREATE USER 'diaspora'@'localhost' IDENTIFIED BY 'password';
Create the Diaspora production database:
CREATE DATABASE IF NOT EXISTS `diaspora_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_bin`;
Grant the MariaDB diaspora user the necessary permissions on the database:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `diaspora_production`.* TO 'diaspora'@'localhost';
Quit the database session.
Try connecting to the new database with the user diaspora (use the password you entered for IDENTIFIED BY 'password' above).
mysql -u diaspora -p -D diaspora_production
You should now see the prompt: MariaDB [diaspora_production]>. Quit the database session by entering:
We are now done installing the MariaDB database.
Next we'll grab the Diaspora source code and get it configured to run on your VPS.