Mysql problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mysql problem
# 1  
Old 07-12-2006
Data Mysql problem

No help guys??? Smilie

Hi guys, i've got a question here... my intention is to write a script that would access a mysql db and extract some info and paste it into a file...

so the first move would be, to access the mysql interface right? hence...

#! /usr/bin/ksh

echo "Job Begin: " `date`

cd /usr/local/mysql/bin

./mysql -u root -pxxxxxx

everything is okay... but after that....
when i type a mysql command in the script for example..

use special;

show tables;

it seems that the script is not able to execute these lines into the mysql...

any idea's or walk around for this problem..?

many thanks in advance...!

Last edited by 12yearold; 07-12-2006 at 04:14 AM..
# 2  
Old 07-12-2006
Guys .... i found the way...
you can.. use the line below to execute a line after your inside the mysql window.

#/usr/local/mysql/bin/mysql --user=xxx --password=xxx [db name] -e 'select * from whatever'

Anyways, thanks for those who at least saw this thread and was trying to help..
thanks a bunch
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Problem in installing mysql

Hi i am trying to install mysql rpm package on my linux machine but getting below error : warning: MySQL-embedded-5.5.28-1.rhel5.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies: MySQL-devel is needed by MySQL-embedded-5.5.28-1.rhel5.i386 ... (9 Replies)
Discussion started by: mukulverma2408
9 Replies

2. AIX

Configuring MySQL problem

Hi, Trying to setup mediawiki on a system but having problems configuring mysql: CC=/usr/bin ./configure checking build system type... powerpc-ibm-aix6.1.0.0 checking host system type... powerpc-ibm-aix6.1.0.0 checking target system type... powerpc-ibm-aix6.1.0.0 checking for a... (9 Replies)
Discussion started by: vpundit
9 Replies

3. Web Development

met problem with do() in MySQL

Hi, I had a chance to create a database refreshing the previous post. An error was tossed out with the following message:DBI connect('nr20111117_db','yifangt',...) failed: Unknown database 'nr20111117_db' at create-nrDB-20111214.pl line 17 Cannot connect: Unknown database 'nr20111117_db' at ... (6 Replies)
Discussion started by: yifangt
6 Replies

4. Shell Programming and Scripting

Problem with PHP and Mysql integration

Hi Experts, I am a beginner of PHP and trying to create a tutorial database. My web interface takes a value and inserts into table very correctly. But when I refresh the same interface, it inserts the same value again and again. My code is below: <?php $con =... (2 Replies)
Discussion started by: naw_deepak
2 Replies

5. UNIX and Linux Applications

mysql conflicts problem

:confused: hi all, RHEL 4 has installed on the server, when i use rpm -i command to install mysql5.1 enterprise version, error failed dependencies occurs as below: mysql conflicts with mysql-4.1.22-2.el4.i386 mysql conflicts with mysql-4.1.22-2.el4.x86_64 have tried rpm -e which was... (2 Replies)
Discussion started by: maxlee24
2 Replies

6. Shell Programming and Scripting

Mysql import problem

Dear folks, i am importing a database since yesterday that is innodb tablespace, the space of dump file is 4GB, almost 24 pass out it is not yet complete. What should i do to import it fastly. I have disable foreign key check because it have some issues so thats why i am importing it with source... (2 Replies)
Discussion started by: learnbash
2 Replies

7. Web Development

Deleting databases in MYSQL problem asking...

Hi, I'm the new user of mysql. I facing one problem to delete one of the database in mysql. Hope can get all of your suggestion and advice. Input: mysql> show databases; +-------------------------+ | Database | +-------------------------+ | information_schema | |... (3 Replies)
Discussion started by: patrick87
3 Replies

8. Linux

MySQL server connetction problem

Hello,thanks for your help. I can't connect my MYSQLserver , the note from my Linux System is 'Error 1130 (00000): Host 'my ip address' is not allowed to connect to this MySQL server. What could I do on this? Thanks again! (4 Replies)
Discussion started by: lancepanda
4 Replies

9. Shell Programming and Scripting

Problem with PHP and MySQL

Okay, I'm new to this PHP and MySQL stuff, so help would be VERY much appreciated. :) On my iMac runnning Panther, it has MySQL and PHP installed. Yet when I view a PHP file from the iMac or another computer at my house, I get the source code. What's wrong? (11 Replies)
Discussion started by: Danny_10
11 Replies

10. UNIX for Advanced & Expert Users

MySQL problem >> missing mysql.sock

MySQL on my server is down.... I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies
Login or Register to Ask a Question