我需要使用 ant 任务启动和停止 mysql 5.5.
I need to start and stop mysql 5.5 using ant task.
早期的 ANT 脚本是为 hsqldb 数据库做的,它使用的类是 org.hsqldb.Server.有人能告诉我 mysql 5.5 使用哪个类.
The earlier ANT script was doing it for hsqldb database for which the class it was using was org.hsqldb.Server. Could someone tell me which class to use for mysql 5.5.
以下是在 hsqldb 用于 mydb 的情况下使用的:<java fork="true" spawn="true" classname="org.hsqldb.Server" classpathref="build.runtime.classpath"><arg line="-database.0 file:data/mydb -dbname.0 mydb"/></java>
Following was being use in case of hsqldb for mydb:
<java fork="true" spawn="true" classname="org.hsqldb.Server" classpathref="build.runtime.classpath">
<arg line="-database.0 file:data/mydb -dbname.0 mydb"/>
</java>
我需要 mysql 5.5 的等效项.我知道连接器是用来连接mysql 5.5数据库的,我用的是mysql-connector-java-5.1.15-bin.jar.
I need to have the eqivalant for mysql 5.5. I know a connector is used to connect to mysql 5.5 database, I use mysql-connector-java-5.1.15-bin.jar.
谁能告诉我如何使用 ant 脚本启动和停止 mysql 数据库.
Could someone just tell me how to start and stop mysql database using an ant script.
谢谢.
将 MySQL 配置为 机器启动时自动启动.MySQL 旨在在后台持续运行.
It would be more normal to configure MySQL to automatically start when the machine boots. MySQL is designed to run continually in the background.
如果您真的想从 ANT 中停止和启动 MySQL,则可以调用服务器脚本(当然,假设 MySQL 与构建运行在同一台机器上).
If you really want to stop and start MySQL from within ANT it's possible to invoke the server scripts (Assuming of course MySQL is running on the same machine as the build).
<target name="start-db">
<exec executable="C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" osfamily="windows">
</exec>
<exec executable="mysql.server" osfamily="unix">
<arg value="start"/>
</exec>
</target>
<target name="stop-db">
<exec executable="C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" osfamily="windows">
<arg value="-u"/>
<arg value="root"/>
<arg value="shutdown"/>
</exec>
<exec executable="mysql.server" osfamily="unix">
<arg value="stop"/>
</exec>
</target>
注意:
这篇关于如何使用 ANT 任务启动 MySql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何有效地使用窗口函数根据 N 个先前值来决定How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函数根据
在“GROUP BY"中重用选择表达式的结果;条款reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用选择表达式的结果;条款?)
Pyspark DataFrameWriter jdbc 函数的 ignore 选项是忽略整Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函数的 ig
使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 时出错,使用 for 循环数组
pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 调用 o23.load 时发生错误 没有合适的
如何将 Apache Spark 与 MySQL 集成以将数据库表作为How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何将 Apache Spark 与 MySQL 集成以将数据库表作为