Sponsored Content
Top Forums Shell Programming and Scripting Putting mysql column value in variable Post 302814931 by figaro on Thursday 30th of May 2013 02:54:43 PM
Old 05-30-2013
Is this a carriage return problem? In other words, are you using the code on both Windows and POSIX machines?
The error message is related to bash, not to mysql.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Separating values from a file and putting to a variable

I am writing into a file testfile.txt values like ./XXXXXXCZ1/tprcm10c.bin ./XXXXXXCZ1_HOT/tprcm09c.bin ./XXXXXXCZ_cold/tprcm05c.bin I want to store the values of tprcm*.bin and XXXXXXCZ* in separate variables Can anybody Pls hlp me out with this ... Thanks (2 Replies)
Discussion started by: ultimatix
2 Replies

2. UNIX for Dummies Questions & Answers

putting grep -c results number in a variable

I want to display "no results found" if a grep search of a name that the user inputs is not found anywhere in a certain file, Right now I have this, but doesn't seem to work. Im not sure what to change. read name results=grep -c $name file if ; then echo "No results found." exit... (1 Reply)
Discussion started by: busdude
1 Replies

3. Programming

declare a variable in mysql

i have created a script to insert 100K rows into mysql db. But the forst line where i declare the variable is giving error. I am new to mysql. Can anyone help me in this? the script is ====================================== DECLARE c INT(10) := 54; BEGIN WHILE c <... (4 Replies)
Discussion started by: amitranjansahu
4 Replies

4. Web Development

Mysql question: Best way to update a column containing 8 million rows

Hi all, I was wondering if anyone knew a good/safe way to update a single column in a table that could contain upto 8 million rows... simple command like: UPDATE set blah=foo where bar=XXX; I will be running this on tables being written to and tables that have already been created. ... (3 Replies)
Discussion started by: muay_tb
3 Replies

5. Shell Programming and Scripting

Text file -> fixed column -> MySQL DB

Hi ! I have searched in the forum, but i'm not able to combine various solution to help me ! My problem is very simple for a bash scripter or a old linux man, but not for me (novice and inexperienced). I need to store in a mysql database the output of "last" command, but the table where i need... (2 Replies)
Discussion started by: axl936
2 Replies

6. Shell Programming and Scripting

Need to extract data from Column having variable length column

Hi , I need to extract data from below mentioned data, having no delimiter and havin no fixed column length. For example: Member nbr Ref no date 10000 1000 10202012 200000 2000 11202012 Output: to update DB with memeber nbr on basis of ref no. ... (6 Replies)
Discussion started by: ns64110
6 Replies

7. Shell Programming and Scripting

Update a mysql column via bash script

Hello, I want to check the value of all MySQL columns.(column name is "status") via bash script. If value is "0" at I want to make only single column value to "1" I have many "0" values on mysql database(on "status" column) "0" means it is a draft post. I want to publish a post. I... (2 Replies)
Discussion started by: tara123
2 Replies

8. Shell Programming and Scripting

Taking nth column and putting its value in n+1 column using awk

Hello Members, Need your expert opinion how to tackle below. I have an input file that looks like below: USS|AWCC|AFGAW|93|70 USSAA|Roshan TDCA|AFGTD|93|72,79 ALB|Vodafone|ALBVF|355|69 ALGEE|Wataniya (Nedjma)|DZAWT|213|50,550 I like output file in below format: ... (7 Replies)
Discussion started by: umarsatti
7 Replies
mysqladmin(1)							  MySQL database						     mysqladmin(1)

NAME
mysqladmin [OPTIONS] command command.... - A utility for performing administrative operations OPTION SYNOPSIS
mysqladmin [-#|--debug= logfile] [-f|--force] [-?|--help] [--character-sets-dir=directory] [-C|--compress] [-h|--host=[#]] [-p[pwd]] [--password=[pwd]] [-P|--port= pnum] [-i|--sleep= sec] [-E|--vertical] [-s|--silent] [-S|--socket= #] [-r|--relative] [-t|--timeout= #] [-u|--user= uname] [-v|--verbose] [-V|--version] [-w|--wait[=retries]] OPTION DESCRIPTION
You can get a list of the options your version of mysqladmin supports by executing mysqladmin --help OPTIONS
-#|--debug=logfile Output debug log. Often this is 'd:t:o,filename` -f|--force Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs -?|--help Display help and exit --character-sets-dir=directory Set the character set directory -C|--compress Use compression in server/client protocol -h|--host=hostname Connect to host -p|--password[=pwd] Password to use when connecting to server If password is not given it's asked from the tty -P|--port=pnum Port number to use for connection -i|--sleep=sec Execute commands again and again with a sleep between -r|--relative Show difference between current and previous values when used with -i extended-status -E|--vertical Print output vertically. Is similar to --relative, but prints output vertically. -s|--silent Silently exit if one can't connect to server -S|--socket=file Socket file to use for connection -t|--timeout=sec Timeout for connection to the mysqld server -u|--user=uname User for login if not current user -v|--verbose Write more information -V|--version Output version information and exit -w|--wait Wait and retry if connection is down COMMAND SYNOPSIS
MySQLADMIN [create databasename ] [drop databasename] [extended-status] [flush-hosts] [flush-logs] [flush-tables] [flush-privileges] [ kill id,id,... ] [password new-password ] [ping] [processlist] [reload] [refresh] [shutdown] [slave-start] [slave-stop] [status] [variables] [version] COMMANDS
Where command is a one or more of: (Commands may be shortened) create databasename Create a new database drop databasename Delete a database and all its tables extended-status Gives an extended status message from the server flush-hosts Flush all cached hosts flush-logs Flush all logs flush-status Clear status variables flush-tables Flush all tables flush-threads Flush the thread cache flush-privileges Reload grant tables (same as reload) kill id,id,... Kill mysql threads password new-password Change old password to new-password ping Check if mysqld is alive processlist Show list of active threads in server reload Reload grant tables refresh Flush all tables and close and open logfiles shutdown Take server down status Gives a short status message from the server variables Prints variables available version Get version info from server SEE ALSO
isamchk(1), isamlog(1), mysql(1), mysqlaccess(1), mysqld(1), mysqld_multi(1), mysqld_safe(1), mysqldump(1), mysql_fix_privilege_tables(1), mysqlshow(1), mysql_zap(1), perror(1), replace(1) For more information please refer to the MySQL reference manual, which may already be installed locally and which is also available online at http://www.mysql.com/doc/en/ BUGS
Please refer to http://bugs.mysql.com/ to report bugs. AUTHOR
Ver 1.0, distribution 4.0.24 Michael (Monty) Widenius (monty@mysql.com), MySQL AB (http://www.mysql.com/). This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (kill-9@kill-9.dk), Mercurmedia Data Model Architect / system developer (http://www.mercur- media.com) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+------------------------------------+ |Availability | SUNWmysqlr, SUNWmysqlu, SUNWmysqlt | +--------------------+------------------------------------+ |Interface Stability | External | +--------------------+------------------------------------+ NOTES
Source for mysql is available on http://opensolaris.org. MySQL 4.0 19 December 2000 mysqladmin(1)
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy