【正文】
age ON test.* TO testuser@localhost。Query OK, 0 rows affected( sec)此后就創(chuàng)建了一個新用戶叫:testuser,這個用戶只能從localhost連接到數(shù)據(jù)庫并可以連接到test數(shù)據(jù)庫。下一步,我們必須指定testuser這個用戶可以執(zhí)行哪些操作:mysql GRANT select, insert, delete,update ON test.* TO testuser@localhost。Query OK, 0 rows affected( sec)此操作使testuser能夠在每一個test數(shù)據(jù)庫中的表執(zhí)行SELECT,INSERT和DELETE以及UPDATE查詢操作?,F(xiàn)在我們結束操作并退出MySQL客戶程序:mysql exitByeMySQL數(shù)據(jù)庫的默認用戶名為“root”(MS SQL Server的sa相似),密碼默認為空。在DOS提示符(注 意,不是mysql提示符)下輸入c:mysqlin“mysqladminu rootp password newpassword回車后會提示你輸入原來的密碼,由于原來密碼為空,直接回車,root用戶的密碼便改為”newpassword“了。Mysql數(shù)據(jù)庫學習心得(5)MySQL圖形界面管理器phpMyAdmin是一套以php3寫成,針對MySQL數(shù)據(jù)庫系統(tǒng)的Web管理界面。它可以很方便地以圖形化界面,來對MySQL數(shù)據(jù)庫里的字段、數(shù)據(jù)進行增加、刪除等的動作,更可以做數(shù)據(jù)庫本身的增刪管理;phpMyAdmin可以管理整個MySQL服務器(需要超級用戶),也可以管理單個數(shù)據(jù)庫。另外,您也可以通過使用這個圖形化界面來學習SQL正確的語法,直至熟練掌握。那要等到你看過MySQL手冊中相關的部分。你可以到。首先,將phpMyAdmin軟件包解到一個目錄下。將原來的設定:167。cfgServers[1][39。host39。] = 39。39。// MySQL hostname167。cfgServers[1][39。port39。] = 39。39。// MySQL portleave blank fordefault port167。cfgServers[1][39。adv_auth39。] = false。// Use advanced authentication?167。cfgServers[1][39。stduser39。] = 39。39。// MySQL standard user(only needed with advanced auth)167。cfgServers[1][39。stdpass39。] = 39。39。// MySQL standard password(only needed with advanced auth)167。cfgServers[1][39。user39。] = 39。39。// MySQL user(only needed withbasic auth)167。cfgServers[1][39。password39。] = 39。39。// MySQL password(only needed with basic auth)167。cfgServers[1][39。only_db39。] = 39。39。// If set to a dbname, only this db is accessible167。cfgServers[1][39。verbose39。] = 39。39。// Verbose name for this hostleave blank to show the hostname::require(”“)。修改成:167。cfgServers[1][39。host39。] = 39。MySQL Server的hostname39。//填入您的MySQL Server的主機名稱167。cfgServers[1][39。port39。] = 39。39。//填入連結MySQL的port,不填則以預設的port進行連結167。cfgServers[1][39。adv_auth39。] = true。//改成true則進入phpMyAdmin必須先身份認證167。cfgServers[1][39。stduser39。] = 39。root39。// MySQL使用者的帳號167。cfgServers[1][39。stdpass39。] = 39。密碼39。// MySQL使用者的密碼167。cfgServers[1][39。user39。] = 39。root39。// MySQL管理帳號167。cfgServers[1][39。password39。] = 39。密碼39。// MySQL管理密碼167。cfgServers[1][39。only_db39。] = 39。39。//指定管理的資庫名稱,不填則可以管理整個Server167。cfgServers[1][39。verbose39。] = 39。39。//指定MySQL的名稱,不填則使用系統(tǒng)本身的hostname::require(”)。//將語言改成中文說明:(1)因本管理接口,可以以一個接口,管理多個MySQL Server,167。cfgServers[1]...167。cfgServers[1]...167。cfgServers[1]...:167。cfgServers[2]...167。cfgServers[2]...167。cfgServers[2]...其中[1]代表第一個MySQL Server,[2]代表第二個MySQL Server,您要管理的MySQL Server超過三臺以上,您可以依照同樣的?述,增加[4].....下去!(2)若您的MySQL Server與 Server是同一臺,則167。cfgServers[1][39。host39。] =可直接填入localhost。最后,打開流覽器,輸入你的網(wǎng)址/phpMyAdmin之后您會看到一個密碼驗證的小窗口,輸入您的MySQL管理帳號及密碼,即可成功地看到phpMyAdmin的管理畫面。通過phpmyadmin,你就可以圖形化的、方便的管理你的所有數(shù)據(jù)庫了。通過以上的學習和操作,終于可以自由操作mysql數(shù)據(jù)庫了,也可以輕車熟路的使用php或者asp調(diào)用mysql了。最后,筆者要特別感謝開發(fā)了mysql并且免費貢獻的天才以及在網(wǎng)上提供mysql使用說明的大蝦們。