文章詳情頁(yè)
MySQL 的日常使用
瀏覽:9日期:2023-10-16 17:51:30
*nix os 下配置文件一般存放位置
Default options are read from the following files in the given order: /etc/my.cnf, /etc/mysql/my.cnf, /usr/local/etc/my.cnf, ~/.my.cnf
默認(rèn)設(shè)置按一下順序讀?。?/p>
/etc/my.cnf, /etc/mysql/my.cnf, /usr/local/etc/my.cnf, ~/.my.cnf
Ubuntu 下的啟動(dòng),停止與重啟啟動(dòng)方式:
方式一:sudo /etc/init.d/mysql start方式二:sudo start mysql方式三:sudo service mysql start停止mysql:
方式一:sudo /etc/init.d/mysql stop方式二:sudo stop mysql方式三:sudo service mysql stop重啟mysql:
方式一:sudo/etc/init.d/mysql restart方式二:sudo restart mysql方式三:sudo service mysql restartMac 下的啟動(dòng),停止與重啟這里記錄通過(guò) homebrew 安裝的操作
啟動(dòng): mysql.server start停止: mysql.server stop重啟: mysql.server restart 或者 reload 或者 force-reload### 權(quán)限管理 查看mysql狀態(tài)
方式一:service mysql status (輸出類似mysql start/running, process 810)方式二:登錄mysql client, 執(zhí)行命令:show status;方式三:Mac 如果是通過(guò) homebrew 安裝的,則可以直接使用 mysql.server status查看增加用戶及權(quán)限
GRANT ALL ON *.* TO ’username’@’hostname’ IDENTIFIED BY ’username’ WITH GRANT OPTION; # 然后刷新權(quán)限 flush privileges;
刪除用戶權(quán)限
REVOKE ALL ON *.* FROM ’username’@’hostname’; # 然后刷新權(quán)限 flush privileges;
標(biāo)簽:
MySQL
數(shù)據(jù)庫(kù)
相關(guān)文章:
1. SQL Server 2005使用基于行版本控制的隔離級(jí)別初探(3) -- SNAPSHOT2. mysql8.0.20數(shù)據(jù)目錄遷移的方法3. MySQL中文亂碼問(wèn)題解決方案4. Microsoft Office Access設(shè)置默認(rèn)日期為當(dāng)前日期的方法5. Microsoft Office Access設(shè)置行高的方法6. 教你如何在SQL Server數(shù)據(jù)庫(kù)中加密數(shù)據(jù)7. 教你快速確定SQL Server欄中的最大值8. MySQL中sum函數(shù)使用的實(shí)例教程9. 在SQL Server 2005數(shù)據(jù)庫(kù)中修改存儲(chǔ)過(guò)程10. 為DB2數(shù)據(jù)庫(kù)創(chuàng)建表空間過(guò)程
排行榜
