linux系統下配置mysql服務的方法
1.首先,在Linux系統中使用命令安裝MySQL服務;
apt-get install mysql-server
2.使用命令安裝mysql后,查看mysql是否安裝成功并啟動;
netstat -tap | grep mysql
3.MySQL服務啟動后,輸入用戶名和密碼,進行登錄mysql;
mysql -u root -p
4.成功登錄mysql后,對mysql添加登錄賬號并授權;
create user 'admin'@'localhost' identified by 'pwd';
grant all privileges on *.* to 'admin'@'localhost' with grant option;
5.最后,賬號添加好后,重啟MySQL服務即可;
service mysql restart