Created
February 28, 2020 08:07
-
-
Save Bazsmagister/ee1d92fd2202262222b468d563b11c59 to your computer and use it in GitHub Desktop.
MySQL on linux in case of some problems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Login as root first: | |
$ sudo mysql -u root | |
Then CREATE or ALTER a non-root user (use '127.0.0.1' instead of 'localhost' if needed): | |
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'adminspassword'; | |
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost'; | |
FLUSH PRIVILEGES; | |
Exit and restart: | |
exit | |
$sudo service mysql restart | |
$sudo service apache2 restart | |
And edit the .env file: | |
DB_CONNECTION=mysql | |
DB_HOST=localhost | |
DB_PORT=3630 //not sure | |
DB_DATABASE=yourdbname | |
DB_USERNAME=admin | |
DB_PASSWORD=adminspassword |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment