剛解決了一個小問題,在此記錄一下。測試伺服器上的mysql,當我在本地使用工具去串連它的時候,報錯:Lost connection to MySQL server at 'reading initial communication packet'我首先想到的是要在伺服器上給所有IP授權,於是在伺服器上使用命令登入mysql,並執行:grant all privileges on dbname.* to 'username'@'%' identified by
Mysql重要發現 請先看我的表結構: 我分別執行以下語句:UPDATE sin_categories SET name='分類特一號', posttime='1214126453', lock='1' WHERE id='1' 出錯 UPDATE sin_categories SET name='分類特一號', posttime='1214126453' WHERE id='1' 正確 UPDATE `sin_categorie` SET `posttime` = '85287258'
mysql 建立使用者方法 命令方式的.注意每行後邊都跟個 ; 表示一個命令語句結束.格式:grant select on 資料庫.* to 使用者名稱@登入主機 identified by "密碼"例1、增加一個使用者test1密碼為abc,讓他可以在任何主機上登入,並對所有資料庫有查詢、插入、修改、刪除的許可權。首先用以root使用者連入MYSQL,然後鍵入以下命令:grant select,insert,update,delete on *.* to test1@"%"
shell>mysql --user=root -p輸入密碼mysql>use mysqlmysql>GRANT SELECT,INSERT,UPDATE,DELETE ON [db_name].* TO [username]@[ipadd] identified by '[password]';[username]:遠程登入的使用者代碼[db_name]:表示欲開放給使用者的資料庫稱[password]:遠程登入的使用者密碼[ipadd]:IP地址或者IP反查後的DNS
SELECT * FROM `m` order by convert(name using gbk) asc;eg:select DISTINCT(b.id),b.ach_name,b.ach_bussiness,b.ach_finish_date,b.ach_finish_unit ,m.areaid,a.areaname from (select
mysql error number 2003 Can't connect to MySQL server xxx.xxx.xxx.xxx (10061) 在ubuntu 9.04中預設安裝了mysql,預設只能本地訪問,google了一下: 採用登入到MySQL伺服器端,在mysql庫下執行grant all on *.* to 'remote'@'172.16.21.39' identified by 'password'; 即可
http://blog.sina.com.cn/s/blog_541086000100tjnb.html grant 許可權 on 資料庫物件 to 使用者(2011-09-06 16:38:43)轉載通過命令”show privileges;”可以查看grant 許可權 on 資料庫物件 to 使用者一、grant 普通資料使用者,查詢、插入、更新、刪除 資料庫中所有表資料的權利。grant select on testdb.* to common_user@’%’grant insert