-
啟動mysql服務
- service mysqld start
-
停止mysql服務
- service mysqld stop
-
重啟mysql服務
- service mysqld restart
-
查找數據庫配置文件
- 默認位置 /etc/my.conf
-
mysql登錄出現1045問題
- mysqld_safe --user=mysql --skip-grant-tables --skip-networking & //不經過授權表來進入服務器
- mysql -u root mysql
- use mysql; //選擇數據庫
- mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’; //修改root密碼
- mysql> FLUSH PRIVILEGES; //刷新權限
-
查找數據庫版本
- mysql環境中
- mysql > status;