简体   繁体   English

从Windows cmd提示符进行MySQL远程访问

[英]MySQL remote access from windows cmd prompt

I am new to MySQL. 我是MySQL的新手。 There is an environment where mysql is installed and DB set up in an Linux server. 在Linux服务器中有一个安装mysql并设置数据库的环境。 Is it possible to access the db using windows command prompt? 是否可以使用Windows命令提示符访问数据库? What would be the best way to access the db remotely from windows machine? 从Windows机器远程访问数据库的最佳方法是什么?

You have to use the -h option 您必须使用-h选项

mysql -u<user> -p -h <dbhost>

for example: 例如:

mysql -uroot -p -h myql.servername.com 

Your user needs remote permissions at your host. 您的用户需要主机上的远程权限。

If you are a new user , use some gui tool to control mysql like https://code.google.com/p/sqlyog/wiki/Downloads . 如果您是新用户,请使用一些GUI工具来控制mysql,例如https://code.google.com/p/sqlyog/wiki/Downloads It will be easier for you. 对您来说会更容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM