Changing the Prompt for timing purposes

Changing the Prompt for timing purposes

Post by TheRef.. » Fri, 15 Apr 2005 01:29:35



Hi,
 The MYSQL command line interface is very basic. Can it be modified like the shell command prompts so that I can include date/time for timing benchmarks?

Secondly, is there an "echo" command in MYSQL command prompt so that I can see the command I issued or a log file that I can write to.....sorry about the basic questions but I'm a newbe.

George

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql

 
 
 

Changing the Prompt for timing purposes

Post by Tom Crimmi » Fri, 15 Apr 2005 01:38:07



> Hi,
>  The MYSQL command line interface is very basic. Can it be modified
> like the shell command prompts so that I can include date/time for
> timing benchmarks?  

> Secondly, is there an "echo" command in MYSQL command prompt so that
> I can see the command I issued or a log file that I can write
> to.....sorry about the basic questions but I'm a newbe.  

> George

Read the following for prompt modification:
http://dev.mysql.com/doc/mysql/en/mysql-commands.html

--
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql


 
 
 

Changing the Prompt for timing purposes

Post by SGr.. » Fri, 15 Apr 2005 01:55:00


--=_alternative 005CA7E985256FE2_=
Content-Type: text/plain; charset="US-ASCII"



> > Hi,
> >  The MYSQL command line interface is very basic. Can it be modified
> > like the shell command prompts so that I can include date/time for
> > timing benchmarks?

> > Secondly, is there an "echo" command in MYSQL command prompt so that
> > I can see the command I issued or a log file that I can write
> > to.....sorry about the basic questions but I'm a newbe.

> > George

> Read the following for prompt modification:
> http://dev.mysql.com/doc/mysql/en/mysql-commands.html

> --
> Tom Crimmins
> Interface Specialist
> Pottawattamie County, Iowa

And to simulate the "echo" you can increase the verbosity of the client
with -v or -v -v or -v -v -v.
http://dev.mysql.com/doc/mysql/en/mysql.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

--=_alternative 005CA7E985256FE2_=--

 
 
 

Changing the Prompt for timing purposes

Post by Andrew Braithwai » Fri, 15 Apr 2005 10:14:51


When you say shell, do you mean DOS or UNIX?

If it's the latter then you may do this for the logfile:

sh-2.05b# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.24-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> ?

For the complete MySQL Manual online visit:
   http://www.mysql.com/documentation

For info on technical support from MySQL developers visit:
   http://www.mysql.com/support

For info on MySQL books, utilities, consultants, etc. visit:
   http://www.mysql.com/portal

List of all MySQL commands:
   (Commands must appear first on line and end with ';')

help    (\h)    Display this help.
?       (\?)    Synonym for `help'.
clear   (\c)    Clear command.
connect (\r)    Reconnect to the server. Optional arguments are db and host.
edit    (\e)    Edit command with $EDITOR.
ego     (\G)    Send command to mysql server, display result vertically.
exit    (\q)    Exit mysql. Same as quit.
go      (\g)    Send command to mysql server.
nopager (\n)    Disable pager, print to stdout.
notee   (\t)    Don't write into outfile.
pager   (\P)    Set PAGER [to_pager]. Print the query results via PAGER.
print   (\p)    Print current command.
prompt  (\R)    Change your mysql prompt.
quit    (\q)    Quit mysql.
rehash  (\#)    Rebuild completion hash.
source  (\.)    Execute a SQL script file. Takes a file name as an argument.
status  (\s)    Get status information from the server.
system  (\!)    Execute a system shell command.
tee     (\T)    Set outfile [to_outfile]. Append everything into given
outfile.
use     (\u)    Use another database. Takes database name as argument.

Connection id: 2  (Can be used with mysqladmin kill)

mysql> \T wibble.txt
Logging to file 'wibble.txt'
mysql> show databases;
+----------+
| Database |
+----------+
| andrew   |
| mysql    |
| phpdb    |
| test     |
+----------+
4 rows in set (0.00 sec)

mysql> Bye
sh-2.05b# ll
total 112
drwxr-xr-x  21 root   wheel   714B 14 Apr 02:07 .
drwxr-xr-x  11 root   wheel   374B 12 Apr 00:44 ..
-rw-r--r--   1 root   wheel    18K  5 Mar 04:37 COPYING
-rw-r--r--   1 root   wheel     5K  5 Mar 04:37 EXCEPTIONS-CLIENT
-rw-r--r--   1 root   wheel     8K  5 Mar 04:37 INSTALL-BINARY
-rw-r--r--   1 root   wheel     1K  5 Mar 00:38 README
drwxr-xr-x  50 root   wheel     1K 20 Mar 13:06 bin
-rwxr-xr-x   1 root   wheel   773B  5 Mar 04:50 configure
drwxr-x---  11 mysql  wheel   374B 12 Apr 01:27 data
drwxr-xr-x   7 root   wheel   238B 20 Mar 13:06 docs
drwxr-xr-x  53 root   wheel     1K 20 Mar 13:06 include
drwxr-xr-x  10 root   wheel   340B 20 Mar 13:06 lib
drwxr-xr-x   3 root   wheel   102B 20 Mar 13:06 man
drwxr-xr-x  10 root   wheel   340B 20 Mar 13:06 mysql-test
drwxr-xr-x   3 root   wheel   102B 20 Mar 13:06 scripts
drwxr-xr-x   3 root   wheel   102B 20 Mar 13:06 share
drwxr-xr-x  31 root   wheel     1K 20 Mar 13:06 sql-bench
-rwxr-xr-x   1 root   wheel    88B 20 Mar 13:13 start
drwxr-xr-x  13 root   wheel   442B 20 Mar 13:06 support-files
drwxr-xr-x  21 root   wheel   714B 20 Mar 13:06 tests
-rw-r--r--   1 root   wheel   160B 14 Apr 02:08 wibble.txt
sh-2.05b# cat wibble.txt
mysql> show databases;
+----------+
| Database |
+----------+
| andrew   |
| mysql    |
| phpdb    |
| test     |
+----------+
4 rows in set (0.00 sec)

mysql> sh-2.05b#

Hope this helps,

Andrew


Quote:> Hi,
>  The MYSQL command line interface is very basic. Can it be modified like the
> shell command prompts so that I can include date/time for timing benchmarks?

> Secondly, is there an "echo" command in MYSQL command prompt so that I can see
> the command I issued or a log file that I can write to.....sorry about the
> basic questions but I'm a newbe.

> George

> __________________________________________________________________
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

> Netscape. Just the Net You Need.

> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql

 
 
 

1. changing mysql prompt

Currently no. But I don't see any reason why not to implement such
feature except that we have a lot things in our TODO lists already and
most new items will go to the end of this list. If you are paying
support customer and really need this feature, write about this feature
request into support list.

--
For technical support contracts, goto https://order.mysql.com/
    __  ___     ___ ____  __

  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Security Administrator
/_/  /_/\_, /___/\___\_\___/   Hong Kong, China
        <___/   www.mysql.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

2. Mouse & Digitiser together?

3. reThink Migration – It’s Time for Change!

4. The Informer Issue 6 Is Here!

5. Does MySQL store TimeZone and DayLight Saving Time changes ?

6. Ease color/resolution help

7. Change Datatype (time)

8. .net sdk install fails

9. Timestamp with time zone change (error) in 7.3.2?

10. How to change default time display format (and buglet?)?

11. Is MyODBC suitable for our purpose?

12. general purpose database cleanup tools (design patterns or Python)?

13. Is right DB for our purpose