How do I use a dynamic filename for an into outfile statement

2012-02-29 Thread Ed Patterson

Be kind, I am by no means any type of DB expert.

I would like to eventually move this to a stored procedure but for now I 
am using the \. to fire it off.


Here is what I have so far (generating a list of machines missing software)

select last_logon.host_name_short
from last_logon
left join mcafee on last_logon.host_name_short = last_logon.host_name_short
where mcafee.host_name_short is null
and last_logon.host_name_short like 'w%'
-- the above works
into outfile (select 
concat('Missing-',date_format(now(),'%Y%m%d%H%i'),'txt');

-- this line breaks it

The select concat() works from the command line
I can manually add the file name but would like to automate the process
Lastly, if it makes a difference, I don't use any graphical tools for DB 
stuff. Inevitably someone says 'click here' :-)


Thanks for any help
Ed

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



innodb SuSE 9.2

2005-01-30 Thread Ed Patterson
I am trying to enable innodb tables. rcmysql returns failed when I 
uncomment any or all of the lines in the innodb section of the/etc/ 
my.cnf. So far I have not been able to locate the file that startup 
errors are logged to.

Do I need to recompile MySQL to enable innodb tables, maybe I should 
simply go buy another book on MySQL that does not require innodb :-)

As always, thanks for any assistance.
SuSE 9.2 Professional
MySQL 4.0.21 installed from distribution media
tons of memory and disk space available
Ed
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 1/28/2005
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


SuSE 9.2 Professional, Runlevel editor via telnet innodb

2005-01-29 Thread Ed Patterson
Greetings,
I need help with a few things:
First I am looking for a way to shutdown and or restart MySQL via 
telnet. mysqld -restart returns
chroot: No such file or directory
Aborting
mysqld -shutdown returns:
Can't start server: Bind on TCP/IP port: Address already in use
Do you already have another mysqld server running on port: 3306
Aborting
mysqld: Shutdown Complete

ps -aux shows mysqld is still active.
It works if I shut it down via YaST and the runlevel editor.
The manual says that innodb is enabled by default with 4.01 however that 
is not true in my case.
mysql show variables like have_%;
+--+---+
| Variable_name| Value |
+--+---+
| have_bdb | NO|
| have_crypt   | YES   |
| have_innodb  | NO|
| have_isam| YES   |
| have_raid| NO|
| have_symlink | YES   |
| have_openssl | NO|
| have_query_cache | YES   |
+--+---+
8 rows in set (0.00 sec)

I am runing SuSE 9.2 Professional
mysqld Ver 4.0.21 for suse-linux on i686
Any help appreiciated.
Ed
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.5 - Release Date: 1/26/2005
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]