【正文】
Feb 27 20:07 share drwxrwxrx 7 root root 4096 Feb 27 20:07 sqlbench drwx 4 mysql mysql 4096 Feb 27 20:07 var shellls l /usr/local/mysql/var total 8 drwx 2 mysql mysql 4096 Feb 27 20:08 mysql drwx 2 mysql mysql 4096 Feb 27 20:08 test shellls l /usr/local/mysql/var/mysql total 104 rw 1 mysql mysql 0 Feb 27 20:08 rw 1 mysql mysql 1024 Feb 27 20:08 rw 1 mysql mysql 8778 Feb 27 20:08 rw 1 mysql mysql 302 Feb 27 20:08 rw 1 mysql mysql 3072 Feb 27 20:08 rw 1 mysql mysql 8982 Feb 27 20:08 rw 1 mysql mysql 0 Feb 27 20:08 rw 1 mysql mysql 1024 Feb 27 20:08 rw 1 mysql mysql 8641 Feb 27 20:08 rw 1 mysql mysql 0 Feb 27 20:08 rw 1 mysql mysql 1024 Feb 27 20:08 rw 1 mysql mysql 8958 Feb 27 20:08 rw 1 mysql mysql 0 Feb 27 20:08 rw 1 mysql mysql 1024 Feb 27 20:08 rw 1 mysql mysql 8877 Feb 27 20:08 rw 1 mysql mysql 428 Feb 27 20:08 rw 1 mysql mysql 2048 Feb 27 20:08 rw 1 mysql mysql 9148 Feb 27 20:08 如果這些文件的屬主及屬性不是這樣,請(qǐng)用以下兩個(gè)命令修正之: shellchown R /usr/local/mysql/var shellchmod R gorwx /usr/local/mysql/var 用root用戶(hù)啟動(dòng)遠(yuǎn)程服務(wù)一直是安全大忌,因?yàn)槿绻?wù)程序出現(xiàn)問(wèn)題,遠(yuǎn)程攻擊者極有可能獲得主機(jī)的完全控制權(quán)?! ?+++++ | Host | User | Password | Select_priv | Grant_priv | ++++++ | localhost | root | | Y | Y | | % | root | | Y | Y | | localhost | | | Y | Y | | % | | | N | N | ++++++ 4 rows in set ( sec) 我們先來(lái)看Unix平臺(tái)的user表。 我們還看到user為空的匿名用戶(hù),雖然它在Unix平臺(tái)下沒(méi)什么權(quán)限,但為了安全起見(jiàn)我們應(yīng)該刪除它: mysql delete from user where user=39。key_buffer_size是用于索引塊的緩沖區(qū)大小,增加它可得到更好處理的索引(對(duì)所有讀和多重寫(xiě)),到你 能負(fù)擔(dān)得起那樣多?! £P(guān)鍵參數(shù)八:thread_cache_size 可以復(fù)用的保存在中的線(xiàn)程的數(shù)量。這 兩個(gè)sql特征 可以在我們具體在實(shí)際開(kāi)發(fā)靈活應(yīng)用,也許可以改變一下我們過(guò)去一些不合理的數(shù)據(jù)庫(kù)操作,可以使我們寫(xiě)的程序更加的合理,更加的易于維護(hù)。 看完之后,我還是覺(jué)得使用sp_depends相對(duì)靠譜。) 代碼 using System。 string password = 3 ? args[3] : 。 [4, 0].Value = Name。 AddObjects(connection, 39。 = 。 [Index, 0].Style = itemStyle。 foreach (KeyValuePairstring, string item in allItems) { Index++。 if (pare == 0) return (, )。 另外第二個(gè)題外話(huà),我發(fā)現(xiàn)印度程序員的確能做事的,對(duì)要做的事情很熟悉,譬如那個(gè)資深系統(tǒng)分析員,對(duì)新業(yè)務(wù)的分析是很快捷準(zhǔn)確的。Data Source=Aron1。 (DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default)) SqlConnection (.NET) Standard Security:Data Source=Aron1。Initial Catalog=pubs。Network Library=DBMSSOCN。false39。true39。Server=Aron1。Trusted_Connection=Yes。Database=pubs。 (use |DataDirectory| when your database file resides in the data directory)Why is the Database parameter needed? Answer: If the database was previously attached, SQL Server does not reattach it (it uses the attached database as the default for the connection).Download the SQL Native Client here (the package contains booth the ODBC driver and the OLE DB provider)Using SQL Server 2005 Express? Don39。Network Library=DBMSSOCN。 (use |DataDirectory| when your database file resides in the data directory) Why is the Database parameter needed? Answer: If the database was previously attached, SQL Server does not reattach it (it uses the attached database as the default for the connection). Using User Instance on a local SQL Server Express instance:Data Source=.\SQLExpress。 or Server=.\SQLExpress。 or Server=Aron1。Server=.\SQLExpress。Server=Aron1。 or Driver={SQL Native Client}。 EquivalentsIntegrated Security=SSPI equals Trusted_Connection=yes Prompt for username and password:(Prompt) = adPromptAlways Driver={SQL Native Client}。false39。 avoids making an additional server roundtrip when obtaining a connection, but the programmer must be aware that the connection state is not being reset. Current Language The SQL Server Language record name. Data SourceorServerorAddressorAddrorNetwork Address The name or network address of the instance of SQL Server to which to connect. Enlist 39。Password=asdasd。Database=pubs。Network Library=DBMSSOCN。 PRompt for username and passWord:(Prompt) = adPromptAlways Driver={SQL Server}。 譬如讓我研究給那個(gè)巨大的數(shù)據(jù)表分區(qū),我辛苦寫(xiě)了詳細(xì)的計(jì)劃,步驟,相關(guān)的SQL,注意事項(xiàng)等等等,最后我問(wèn)起來(lái),一句話(huà)答復(fù):我不會(huì)應(yīng)用的。 public string Status { get { return status。 if (!(itemName)) (itemName, new KeyValuePairstring, string(itemName, [j][type].ToString()))。 for (int i = 0。 (path)。 int index = 5。 ()。 args[3] = passWord。 以下代碼沒(méi)有什么特別的,都是循環(huán)所有存儲(chǔ)過(guò)程,然后循環(huán)每個(gè)存儲(chǔ)過(guò)程的依賴(lài)對(duì)象,然后排序輸出(先按照類(lèi)型,然后按照名稱(chēng))。首先我發(fā)現(xiàn)這個(gè):。例如:創(chuàng)建視圖,然后通過(guò)視圖來(lái)查詢(xún)?! £P(guān)鍵參數(shù)七:table_cache 為所有線(xiàn)程打開(kāi)表的數(shù)量?! £P(guān)鍵參數(shù)二:interactive_timeout 服務(wù)器在關(guān)閉它前在一個(gè)交互連接上等待行動(dòng)的秒數(shù)。root39?!⊥獠烤W(wǎng)絡(luò)安全 MySQL數(shù)據(jù)庫(kù)安裝好以后,Unix平臺(tái)的user表是這樣的: mysql use mysql。其次就是數(shù)據(jù)目錄和數(shù)據(jù)文件的安全性,也就是權(quán)限設(shè)置問(wèn)題。它具有功能強(qiáng)、使用簡(jiǎn)便、管理方便、運(yùn)行速度快、安全可靠性強(qiáng)等優(yōu)點(diǎn),用戶(hù)可利用許多語(yǔ)言編寫(xiě)訪問(wèn)MySQL 數(shù)據(jù)庫(kù)的程序,特別是與php更是黃金組合,運(yùn)用十分廣泛。默認(rèn)安裝后服務(wù)要用mysql用戶(hù)來(lái)啟動(dòng),不允許root用戶(hù)啟動(dòng)。其中redhat只是我試驗(yàn)機(jī)的機(jī)器名,所以實(shí)際上Unix平臺(tái)的MySQL默認(rèn)只允許本機(jī)才能連接數(shù)據(jù)庫(kù)。39。如果你使它太大,系統(tǒng)將開(kāi)始換頁(yè)并且真的變慢了。如果有,新的線(xiàn)程從緩存中取得,當(dāng)斷開(kāi)連接的時(shí)候如果有空間,客戶(hù)的線(xiàn)置在緩存中。 資料引用:自動(dòng)輸出SQL Server對(duì)象依賴(lài)列表到EXCEL文件前言類(lèi)似的軟件很多年前寫(xiě)過(guò),不過(guò)現(xiàn)在在新國(guó)家,新環(huán)境,印度佬(我囧)資深系統(tǒng)分析員要求我:給現(xiàn)有的數(shù)據(jù)庫(kù)的所有存儲(chǔ)過(guò)程分別列舉所有依賴(lài)的對(duì)象。我服了,寫(xiě)代碼的風(fēng)格千差萬(wàn)別,一些是[Foo],一些是Foo,而且不同的存儲(chǔ)過(guò)程名稱(chēng)可能存在完全給另外一個(gè)包含,譬如Foo Foo1 AFoo等。 代碼(讓你容易找點(diǎn)。 string user = 2 ? args[2] : 。 [0, 0].Value = ({0} database dictionary, Database)。, Stored Pr