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 5968173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:03:05+00:00 2026-05-22T20:03:05+00:00

Because the vertical output mode of the mysql command is very nice, I’ve setup

  • 0

Because the vertical output mode of the mysql command is very nice, I’ve setup my environment to default the output to vertical layout. I’ve done this by creating c:\windows\my.cnf that contains

[mysql]
vertical

Regrettably, all my mysql shell scripts also pick up on this setting, wreaking havoc with parsing the output of the mysql command.

Is there command-line switch or SQL I can use to override the vertical setting in my.cnf when invoking mysql from a shell script?

Specifically, I have a shell script that looks something like this

set SQLFILE=.\cmdelOldRecords.sql
set TMPCKTFILE=.\temp2.sql

:: get all "_aud" tables from database
mysql -h %1 --port=3306 --database=%MYSQL_DB% --user=%MYSQL_USER% --password=%MYSQL_PASSWORD% -B -N -e "show tables like '%%\_aud'" > %TMPCKTFILE%

for /F "tokens=1" %%i in ('type %TMPCKTFILE%') do (
    echo drop table %%i; >> %SQLFILE%
    echo commit; >> %SQLFILE%
)

mysql -h %1 --port=3306 --database=%MYSQL_DB% --user=%MYSQL_USER% --password=%MYSQL_PASSWORD% -B -N < %SQLFILE%

But my .\cmdelOldRecords.sql ends up with stuff like

drop table ***************************; 
  • 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-22T20:03:05+00:00Added an answer on May 22, 2026 at 8:03 pm

    there is the -E (or –vertical) switch to get the client act vertical
    this means you could try:

    mysql --vertical=false
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

? Need fixed Header Row from Vertical Scroll bar, because my GridView is very
Because we don't have a good staging environment we often have to debug issues
I found a vertical menu but I'm having some problems with it , because
Ok, here is my problem: I have a vertical layout which contains a QPlainTextEdit
Note: by width i mean the height here, I use width because by default,
VHDL allows the following substitutions, presumably because some computers might not support the vertical
i was trying to layout views within RelativeLayout like this: <?xml version=1.0 encoding=utf-8?> <RelativeLayout
Because regular expressions scare me, I'm trying to find a way to remove all
Because of the more tedious way of adding hosts to be monitored in Nagios
Because windows is case-insensitive and because SVN is case-sensitive and because VS2005 tends 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.