MySQL
scoop is necessaryYou can manage multiple versions of PHP on same machine with scoop, if you don't install it, check this guide: scoop
Install MySQL with scoop
PowerShell
sudo scoop install mysql
You will have some infos in output, but find this line mysqld --install MySQL --defaults-file="path\to\my.ini"
. Copy/paste it and execute it with sudo
(if you take this example, change USERNAME
). This command will install Service for MySQL.
PowerShell
sudo mysqld --install MySQL --defaults-file="C:\Users\USERNAME\scoop\apps\mysql\current\my.ini"
Open Task Manager and find Services tab, search MySQL, click right on it to start this Service.
Create new user
Access to MySQL CLI with mysql
PowerShell
mysql
Alter root
user (you can change password
if you want more secure password)
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
You can create new user, you can change
username
and password
CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
exit