Mysql

Step 1 - Install MySQL on Ubuntu and CentOS

Ubuntu:

apt-get -y install mysql-client mysql-server

Centos:

yum install mysql-client mysql-server
/etc/init.d/mysqld start

Start MySQL service

systemctl enable mysql
systemctl start mysql

Step 2 - Configuring Mysql

mysql_secure_insallation
# create local user
mysql> CREATE USER 'demo'@'localhost' IDENTIFIED BY 'dEMO123!@#';

# create database 
mysql> CREATE DATABASE laravel;

# add grand permission local user to laravel database
mysql> GRANT ALL ON laravel.* to 'demo'@'localhost';

# reload 
mysql> FLUSH PRIVILEGES;
mysql> quit 

Last updated