MySQl accessed by ssh in win11

1.Open PowerShell via administrator role,then run to confirm whether the ssh has been installed in win11

ssh -V

image

 

2.Access mysql via ssh, prerequisite you must configure mysql.exe path in system environment variables path “"C:\Program Files\MySQL\MySQL Server 9.0\bin\”

enviroment variables

image

 

 

 Then run below command

mysql -uroot -p -Dmydb;

 

image

 

 

3.When mysql logged successfully,then i can run sql commad

select now();
select current_timestamp();
select @@version;

image

 

posted @ 2025-10-07 21:28  FredGrit  阅读(8)  评论(0)    收藏  举报