I am sorry but neither removing helped me solve the problem. I follow the following steps in CMD normally,
cd "C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\ mysql -u root -p ********* CREATE DATABASE xyz; It works great when done manually but not with Jenkins. In jenkins it is not taking the password , the build is running continuously. Any guidance is appreciated. Regards, Harvey On Monday, September 4, 2017 at 4:13:05 PM UTC+2, Daniel Butler wrote: > > Remove the starting and finishing triple quote marks (they’re only needed > in a pipeline script) > > > > Note you’ll need to provide the username and password as part of the > command line to MySQL; you’re best to use the Credentials Binding plugin > and use a ‘Username and Password (Separated)’ binding. Then you can refer > to them in the batch script as regular environment variables. > > > > Regards, > > Daniel. > > > > *From: *harvey <javascript:> > *Sent: *04 September 2017 14:01 > *To: *Jenkins Users <javascript:> > *Subject: *Re: Multiple commands > > > > Hi Daniel, > > Thank you for your reply. I am using a freestyle job and unfortunately the > script didnot work in my case: > > I choosed execute windows batch command and typed the following: > > """ cd c:\.... > ....\mysql --username --password -e "DROP DATABASE xyz; CREATE DATABASE > xyz;" > """ > Is there something which am missing ? > > Regards, > Harvey > > On Monday, September 4, 2017 at 1:43:29 PM UTC+2, Daniel Butler wrote: > > > > Are you using freestyle jobs or pipeline? > > With Pipeline: > > > When you use a bat/sh step you’re providing a batch or shell script rather > than virtual input into a console. > > > > In your case you’d need to do something like: > bat """ > > cd c:\... > > ...\mysql --user %user% --password %password% -e "DROP DATABASE xyz; > CREATE DATABASE xyz;" > > """ > > > > Freestyle you’d use the same text between the triple quotes in a Batch > step. > > > > Regards, > > Daniel. > > > > *From: *harvey > *Sent: *04 September 2017 12:04 > *To: *Jenkins Users > *Subject: *Multiple commands > > > > Hi, > > I am a new user to Jenkins. I just started working with Jenkins. I am > learning to automate using Jenkins. But I dont find like how to pass two > commands? For example, if I need to run a database creation using MySQL I > should do the following: > > cd c:\...\MySQL 5.5 server\bin\mysql.exe > password: ******** > drop database xyz; > create database xyz; > > Actually there is a wait between the execution of the commands, so how do > i do it? Please if someone could help ? > > Regards, > Harvey > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/02c8c0a5-190d-4c65-b1b5-bf29ad352759%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-users/02c8c0a5-190d-4c65-b1b5-bf29ad352759%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/040e2219-39ea-4490-b290-1b559eabb935%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-users/040e2219-39ea-4490-b290-1b559eabb935%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0742247a-9147-4ba1-b488-7c02896cc39e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
