简体   繁体   English

MySQL命令无法在Windows CMD上运行

[英]MySQL Commands not working on Windows CMD

I have a problem with my MySQL setup on Windows. 我的Windows上的MySQL设置有问题。 First of all I downloaded the latest Windows Installer from dev.mysql.com and installed the server. 首先,我从dev.mysql.com下载了最新的Windows Installer并安装了服务器。 Now when I am trying to execute MySQL commands in the cmd (I already modified the PATH variable, and I am logged in as MySQL root user) the command won't be executed, there is just a "->" showing up. 现在,当我尝试在cmd中执行MySQL命令时(我已经修改了PATH变量,并且我以MySQL root用户身份登录),命令将不会执行,只显示“ - >”。

I can only exit this "mode" by typing in "\\q", and not by executing "exit". 我只能通过输入“\\ q”来退出这个“模式”,而不是通过执行“退出”。

Maybe you can help me, I really need MySQL for my Ruby on Rails project. 也许你可以帮助我,我真的需要MySQL用于我的Ruby on Rails项目。

Thank you! 谢谢!

The MySQL command line lets you use multiple lines for a command, for instance 例如,MySQL命令行允许您为命令使用多行

mysql> SELECT *
> FROM myTable
> LIMIT 0,10;

The use of the semicolon ; 分号的使用; is to tell the command line that that is the end of the command 是告诉命令行那是命令的结尾

So after your commands on the command line end it with a semicolon if you do not need to add anything else 因此,在命令行上的命令结束后,如果您不需要添加任何其他内容,则以分号结束

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

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