修改mysql的預設字元集是通過修改它的設定檔來實現的。一般分兩種情況:Windows平台windows下的mysql設定檔是my.ini,一般在c:\windows\my.ini或者c:\winnt\my.ini可以直接在這個檔案裡面加上default-character-set=gbk #或gb2312,big5,utf8然後重新啟動mysqlservice mysql restart或/etc/init.d/mysql
當初次在機器上安裝完Mysql時,你可以匿名進行訪問資料庫或者以不帶口令的root身份進入資料庫.另外如果你是一個管理員,你還要進行一些使用者的建立及授權,這又涉及到設定密碼的問題.下面我們就討論一下如何設定密碼:首先我們應該知道Mysql資料庫中的口令儲存必須用password()函數加密它.因為在user表中是以加密形式儲存口令,而不是作為純文字.如果你沒有加密,直接在資料庫中執行以下語句:use mysqlinsert into user (host,user,password)
Group commit and real fsync分組提交和即時fsyncDuring the recent months I’ve seen few cases of customers upgrading to MySQL 5.0 and having serious performance slow downs, up to 10 times in certain cases. What was the most surprising for them is the
Descending indexing and loose index scan降序索引和減輕索引掃描Comments to my previous posts, especially this one by Gokhan inspired me to write a bit about descending indexes and about loose index scan, or what Gokhan calls “better range” support.
Every so often people ask me the question how should they estimate memory consumption by MySQL Server in given configuration. What is the formula they could use.經常有人問我配置MySQL時該如何估算記憶體的消耗。那麼該使用什麼公式來計算呢?The reasons to worry about memory usage are
If someone asks me about MySQL Backup advice my first question would be if they have LVM installed or have some systems with similar features set for other operation systems. Veritas File System can do it for Solaris. Most SAN systems would work as
Starting MySQL 4.1, MySQL had support for what is called derived tables, inline views or basically subselects in the from clause.In MySQL 5.0 support for views was added.從MySQL 4.1開始,它已經支援派生表、聯機視圖或者基本的FROM從句的子查詢。These features are quite related to
原文摘錄自:http://forge.mysql.com/wiki/ServerVariablesMemory-Related Variables記憶體相關變數These server variables control the amount of memory allocated to the various buffers and caches within MySQL.以下這些伺服器變數控制這MySQL分配給各種緩衝或者換緩衝的記憶體總數。join_buffer_size(PER