• <legend id='WPtDC'><style id='WPtDC'><dir id='WPtDC'><q id='WPtDC'></q></dir></style></legend>
    1. <small id='WPtDC'></small><noframes id='WPtDC'>

          <bdo id='WPtDC'></bdo><ul id='WPtDC'></ul>
      1. <i id='WPtDC'><tr id='WPtDC'><dt id='WPtDC'><q id='WPtDC'><span id='WPtDC'><b id='WPtDC'><form id='WPtDC'><ins id='WPtDC'></ins><ul id='WPtDC'></ul><sub id='WPtDC'></sub></form><legend id='WPtDC'></legend><bdo id='WPtDC'><pre id='WPtDC'><center id='WPtDC'></center></pre></bdo></b><th id='WPtDC'></th></span></q></dt></tr></i><div id='WPtDC'><tfoot id='WPtDC'></tfoot><dl id='WPtDC'><fieldset id='WPtDC'></fieldset></dl></div>

        <tfoot id='WPtDC'></tfoot>
      2. 如何使用 ANT 任务启动 MySql

        时间:2023-08-21

        <small id='vGIYC'></small><noframes id='vGIYC'>

          1. <legend id='vGIYC'><style id='vGIYC'><dir id='vGIYC'><q id='vGIYC'></q></dir></style></legend>
          2. <i id='vGIYC'><tr id='vGIYC'><dt id='vGIYC'><q id='vGIYC'><span id='vGIYC'><b id='vGIYC'><form id='vGIYC'><ins id='vGIYC'></ins><ul id='vGIYC'></ul><sub id='vGIYC'></sub></form><legend id='vGIYC'></legend><bdo id='vGIYC'><pre id='vGIYC'><center id='vGIYC'></center></pre></bdo></b><th id='vGIYC'></th></span></q></dt></tr></i><div id='vGIYC'><tfoot id='vGIYC'></tfoot><dl id='vGIYC'><fieldset id='vGIYC'></fieldset></dl></div>
              • <bdo id='vGIYC'></bdo><ul id='vGIYC'></ul>

                • <tfoot id='vGIYC'></tfoot>
                    <tbody id='vGIYC'></tbody>
                  本文介绍了如何使用 ANT 任务启动 MySql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我需要使用 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>
                  

                  注意:

                  • 此脚本包含在 windows 和 unix 上启动/停止的命令.
                  • MySQL 文档描述了如何启动 Mysql从 windows 命令行

                  这篇关于如何使用 ANT 任务启动 MySql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 MySQL 中可靠地删除和创建数据库和用户 下一篇:如何将 MySQL yacc 语法转换为 antlr LL(1)?

                  相关文章

                  最新文章

                  <legend id='XbehP'><style id='XbehP'><dir id='XbehP'><q id='XbehP'></q></dir></style></legend>
                  1. <i id='XbehP'><tr id='XbehP'><dt id='XbehP'><q id='XbehP'><span id='XbehP'><b id='XbehP'><form id='XbehP'><ins id='XbehP'></ins><ul id='XbehP'></ul><sub id='XbehP'></sub></form><legend id='XbehP'></legend><bdo id='XbehP'><pre id='XbehP'><center id='XbehP'></center></pre></bdo></b><th id='XbehP'></th></span></q></dt></tr></i><div id='XbehP'><tfoot id='XbehP'></tfoot><dl id='XbehP'><fieldset id='XbehP'></fieldset></dl></div>
                      <bdo id='XbehP'></bdo><ul id='XbehP'></ul>
                    <tfoot id='XbehP'></tfoot>

                      <small id='XbehP'></small><noframes id='XbehP'>