windows 上Mysql遠端連線配置

2021-07-11 13:51:40 字數 799 閱讀 5269

例子:

允許myuser使用mypassword從任何主機連線到mysql伺服器。

grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;

flush   privileges;

允許使用者myuser從ip為192.168.1.6的主機連線到mysql伺服器,並使用mypassword作為密碼

grant all privileges on *.* to 'myuser'@'192.168.1.3' identified by 'mypassword' with grant option;

flush   privileges;

允許使用者myuser從ip為192.168.1.6的主機連線到mysq伺服器的dk資料庫,並使用mypassword作為密碼

grant all privileges on dk.* to 'myuser'@'192.168.1.3' identified by 'mypassword' with grant option;

flush   privileges;

問題:配置完之後還是不能訪問。

原因:原因 - windows 防火牆 在windows cmd上使用管理員許可權執行下面的命令即可:

netsh advfirewall firewall add rule name="mysql server" action=allow protocol=tcp dir=in localport=3306

在Windows上實現遠端IAT hook

iat hook,就是我們要hook的目標函式在匯入表it中,通過修改目標函式所在iat中項的位址為我們自定義函式的位址,從而實現函式hook。在這裡我們要hook的目標是乙個遠端程序,採用之前部落格 windows上的程序注入 一文中用到的反射式dll注入這一技術,在其中新增額外的iat hook...

windows下遠端連線Mysql

使用 ctrl r 組合鍵快速開啟cmd視窗,並輸入 cmd 命令,開啟cmd視窗。使用 mysql uroot proot 命令可以連線到本地的mysql服務。使用 use mysql 命令,選擇要使用的資料庫,修改遠端連線的基本資訊,儲存在mysql資料庫中,因此使用mysql資料庫。使用 gr...

windows下遠端連線Mysql

使用 ctrl r 組合鍵快速開啟cmd視窗,並輸入 cmd 命令,開啟cmd視窗。使用 mysql uroot proot 命令可以連線到本地的mysql服務。使用 use mysql 命令,選擇要使用的資料庫,修改遠端連線的基本資訊,儲存在mysql資料庫中,因此使用mysql資料庫。使用 gr...