Ant构建失败的MySQL [英] Ant build failed for mysql
本文介绍了Ant构建失败的MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行使用MySQL以下错误发生Ant构建
When I run Ant build using mysql the following error occur
Cannot run program "mysql" (in directory
"D:\Projects\OBSWorkspace\schoolforms\db"):
CreateProcess error=2, The system cannot find the file specified
当我在本地CMD以下信息运行mysql发生
when i run mysql in local cmd the following message occur
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password:
NO)
如何生成和从脚本创建数据库运行ant。
how to run ant for generating and creating database from the script.
推荐答案
你需要尝试通过CMD线与MySQL进行连接,例如INT这种方式首先的mysql -u根-p根
来知道你是能够做到这一点。其次,你可以从Ant构建使用此code做到这一点:
First of all you need to try to connect with mysql via cmd line, for example int this way mysql -u root -p root
to know that you are able to do it. Secondly you can do it from ant build using this code:
<project name="mysql.test" default="mysqltest">
<target name="mysqltest">
<exec executable="cmd.exe">
<arg value="mysql" />
<arg value="-u root" />
<arg value="-p root" />
</exec>
</target>
</project>
您可能会尝试这样做不是通过 CMD
键,这就是为什么你不能连接。
You probably try to do it not via cmd
and thats why you can't connect.
这篇关于Ant构建失败的MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文