[精讚] [會員登入]
2076

Mysql 安裝完畢要做的事

Mysql 安裝完畢後,該處理的流程

分享此文連結 //n.sfs.tw/11577

分享連結 Mysql 安裝完畢要做的事@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2017-11-10 11:59:13 最後編修
2017-08-08 11:16:58 By 張○○
 

自動目錄

Mysql 安裝完畢後,就突然不知要做什麼,把流程寫一下:

1. 先啟動 mysql

# service mysqld start

2. 設定root密碼

# mysqladmin -uroot flush-privileges password "1234"

3. 修改設定檔

# vi /etc/my.cnf.d/server.cnf

修改設定檔內容範例:

[mysqld]
port        = 3306
socket      = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 640M
max_allowed_packet = 10M
table_open_cache = 512
sort_buffer_size = 20M
read_buffer_size = 20M
read_rnd_buffer_size = 32M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# CPU's*2 
thread_concurrency = 8

4. 基本操作

mysql預設存收資料庫檔案的位置 /var/lib/mysql

重啟資料庫

# systemctl restart mysql

延伸閱讀

[Mysql/Mariadb] 建立使用者及資料庫@新精讚

[Mysql/MariaDB] 新增使用者,刪除使用者@精讚

[Centos7] 安裝phpMyAdmin@新精讚

[Mysql/Mariadb] 忘記root密碼@新精讚

參考資料

[1] http://bbs.ecstart.com/redirect.php?tid=28204&goto=lastpost


原文 2010-02-22 10:29:40

END

你可能感興趣的文章

[Mysql] Trigger 觸發使用方法 trigger 在資料庫的使用上,具有極大的方便性,該如何使用?

[mysqldump] Mysqldump時出現記憶體錯誤Out of memory 當進行 mysqldump 時出現 Out of memory (Needed xxxxx bytes) 的錯誤,該如何處理?

[MySQL/Mariadb] 正規表達式(regular express) mysql的正規表達式很詭異,很不能接受

[Mysql/MariaDB] 修改資料庫、表格或欄位名稱 Mysql/MariaDB修改資料庫、表格或欄位名稱

[Mysql/Mariadb] 密碼設定強度修改 新的mysql對於密碼預設也把原來的規則改得更嚴格,此篇教你修改密碼的設定政策

[Mysql/Mariadb] 全文檢索 fulltext index 關於 MySQL 的全文檢索

隨機好文

[CodeIgniter3] 解決無法上傳特定檔案(.sb2)的問題 上傳時出現The filetype you are attempting to upload is not allowed,要怎麼解決?

詭異的創業思維 創業的思維中,有多少銀彈,有多少技術,有多少人脈,有多少時間等等,每個都要考慮進去,以熱忱建立的關係脆弱的像蘇打餅乾一樣..

[CodeIgniter 3] 資料庫的使用方法整理2/2 CI3 承襲 CI2,有很多的builder class可以用,依各人的使用習慣,有人喜歡一堆sql字串,有人喜歡用helper

最值得學的電腦技能 什麼是最值得學的電腦技能?程式設計?美工繪圖?系統網路?還是…? 都不是!個人覺得一個最值得學的電腦技能就

[AS3] 變數型態 基本類型宣告 as3 有下列幾種基本類型:string, int, number, object, boolean, n