Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4071278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:44:12+00:00 2026-05-20T16:44:12+00:00

As subject I’d like to know if it’s possible to use mysqldump excluding some

  • 0

As subject I’d like to know if it’s possible to use mysqldump excluding some databases under windows.
I’ve already googled and I’ve found this:

http://datacharmer.blogspot.com/2010/12/excluding-databases-from-mysqldump.html

but I’m looking for a solution under windows that doesn’t require external tool like powershell,gnuwin32 and so on. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:44:12+00:00Added an answer on May 20, 2026 at 4:44 pm

    This is my final script. It obviously requires odbc driver.

    set cn = CreateObject("ADODB.Connection")
    set rs = CreateObject("ADODB.Recordset")
    Set oShell = WScript.CreateObject("WScript.Shell")
    user = "my_user"
    password = "my_password"
    mysqlPath = "C:\mysql_path\bin\mysqldump.exe"
    bkDate = DatePart("yyyy",Date) _
             & Right("0" & DatePart("m",Date), 2) _
             & Right("0" & DatePart("d",Date), 2)
    dumpPath = "c:\my_path\dump_" & bkDate & ".txt"
    strDbList = ""
    cn.connectionString = "Driver={MySQL ODBC 5.1 Driver};Server=localhost;User="&user&";Password="&password&";"
    cn.open
    rs.open "select schema_name from information_schema.schemata where schema_name not in('db1','db2','.....') order by schema_name", cn, 3
    rs.MoveFirst
    while not rs.eof
        strDbList = strDbList & rs(0) & " "
        rs.movenext
    wend
    oshell.run "cmd /k " & mysqlPath & " -u" & user & " -p" & password & " --database " & strDbList & "> " & chr(34) & dumpPath & chr(34),0    
    cn.close
    set oShell = nothing                                                          
    set rs = nothing
    

    Hope that it helps someone else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Subject says it all: the program, running under Linux, needs to know how it
I know this subject has been done already over and over. but... i must
The subject really says it all: Is there a WPF progressbar like the Windows
If I have an subject under test with a timer that causes some action
Subject of discussion: User security on non rooted Android phones. Is it possible to
The subject line says it all really, I just assumed that you could use
The subject line says it all. I'd also like to do this using pipes.
Sorry for unclear subject but i really don't understand where problem. I use a
The subject kind of says it all. EDIT: I know this is a ReSharper
I know this subject was discussed here, but I really can't get this to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.