1、遠端登入win7下的mysql:
1.1)、開啟防火牆,開放mysql使用的埠,如3306埠。
1.2)、授權。使用如下語句進行授權,使得root使用者使用root密碼從任何主機連線到mysql伺服器。
語句: grant all privileges on *.* to 'root'@'% 'identified by 'root' with grant option;
例如:如果你想允許使用者myuser從ip為192.168.0.101的主機連線到mysql伺服器,並使用mypassword作為密碼,則可以使用如下語句:
grant all privileges on *.* to 'myuser'@'192.168.0.101'identified by 'mypassword' with grant option;
2、遠端登入ubuntu10.10下的mysql:
2.1)、修改配置檔案,使用如下語句:
#sudo gedit /etc/mysql/my.cnf (預設安裝mysql,配置檔案所在的路徑為)。
注釋掉配置檔案中這條語句:bind-address = 127.0.0.1,即:#bind-address = 127.0.0.1 。
2.2)、授權。使用如下語句進行授權,使得root使用者使用root密碼從任何主機連線到mysql伺服器。
語句: grant all privileges on *.* to 'root'@'% 'identified by 'root' with grant option;
例如:如果你想允許使用者myuser從ip為192.168.0.101的主機連線到mysql伺服器,並使用mypassword作為密碼,則可以使用如下語句:
grant all privileges on *.* to 'myuser'@'192.168.0.101'identified by 'mypassword' with grant option;
Mysql 遠端登入
ubuntu系統 my.cnf 在 etc mysql 目錄下 注釋bind address 127.0.0.1 或者 改為你希望的ip,0.0.0.0 表示所有ip 如果不注釋 bind address 會出現 error 2003 hy000 can t connect to mysql ser...
mysql遠端登入
準備 兩台電腦,一台osx 64,一台windows7 32,將win7 32作為主機,osx 64遠端訪問win7 32的mysql。第一步 ping下ip windows命令 ipconfig all 兩台電腦都放在同乙個區域網中,因此能夠ping通 第二步 修改win7 32中的mysql,使...
MYSQL遠端登入
其實mysql遠端登入很簡單。首先,進入mysql mysql u root p 密碼 然後可以進入到mysql資料庫裡,檢視裡面的user表。執行命令 u use mysql u u select host,user from user u 這裡可以看到 host user b 127.0.0.1...