Skip to content

Installing MySQL

This guide will help you install MySQL on your server or local machine and configure it to work with your Laravel application.

If you prefer to use another database like PostgreSQL, you can skip this guide and refer to the official documentation of your database.

✅ Recommended version: MySQL 8.0+

1. Install MySQL

Ubuntu / Debian

bash
sudo apt update
sudo apt install mysql-server
sudo mysql_secure_installation

CentOS / RHEL

bash
sudo yum install mysql-server
sudo systemctl enable --now mysqld
sudo systemctl start mysqld

macOS

bash
brew install mysql
brew services start mysql

Configure MySQL

Login to MySQL with the following command:

bash
mysql -u root -p

Create a new database and user:

⚠️ Replace USE-YOUR-PASSWORD with your own password. You can similar services to generate a strong password.

https://www.eset.com/lv-ru/password-generator/

sql
CREATE DATABASE colibriplus CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'colibriplus'@'localhost' IDENTIFIED BY 'USE-YOUR-PASSWORD';
GRANT ALL PRIVILEGES ON colibriplus.* TO 'colibriplus'@'localhost';
FLUSH PRIVILEGES;
EXIT;

2. Configure ColibriPlus

Open the .env file and update the following variables:

env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=colibriplus
DB_USERNAME=colibriplus
DB_PASSWORD=USE-YOUR-PASSWORD

3. Run Migrations

Run the following command to run the migrations:

bash
php artisan migrate

If everything above is done correctly, your migrations will be run and you can start using the database.

Developed by Mansur Terla. www.terla.me