MySQL
2022/2/26小于 1 分钟
MySQL
# isntall mysql
sudo apt install mysql-server
# run security script and config root user
sudo mysql_secure_installation
# til now, command mysql must run with sudo, create a user to resolve this
# first connect to mysql server with root
# create user
CREATE USER 'koston'@'localhost' IDENTIFIED BY 'koston.localhost';
# grant all privileges
GRANT ALL PRIVILEGES ON *.* TO 'koston'@'localhost' WITH GRANT OPTION;
# flush
FLUSH PRIVILEGES;
# exit
exit;