I'm trying to develop a script file that can manipulate a mysql database. I can query the db no problem... That is until I try to create a function that will do the work for me. I've tested several scenarios to try to get around it. But I can't seem to find anything that will work when passing queries via a function. The basic code included below has testing provisions that can be uncommented.
Also, when running this with ksh -x. The input to mysql is identical whether or not the function is being used. The read statement fails when run withing a function.
HI
I have a dsv file that looks like:
<<BOF>>
record_number|id_number|first name|last name|msisdn|network|points|card number|gender
312|9101011234011|Test Junior|Smith|071 123 4321|MTN|73|1241551413214444|M
313|9012023213011|Bob|Smith|27743334321|Vodacom|3|1231233232323244|M... (4 Replies)
After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the:
mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Hello.
First of all thanks for everybody helping on this forum. It's my first post on here but this forum helped me a lot many times.
I'm making a small script, that creates folders that you type, and copy wordpress on it. Far that it works, problem is when I want to create databases with... (10 Replies)
I am looking to do a ls on a folder and have the output of the ls be structured so that is is modificaiton date, file name with the date in a format that is compatible with mysql. I am trying to build a table that stores the last modification date of certain files so I can display it on some web... (4 Replies)
I have a script (below) which works ok, but I have tried to modify it as I want to keep the older files for a restore if needed. I have tried adding a date suffix to the newly created files (second lump of code), but it doesn't seem to work.
I get the error:
$SOURCEDIR/p1db_$DATEVAR.sql:... (3 Replies)
Hi,
I have a .csv file created by a script with data in a tabular format.
I need to insert all the value into mysql database which is running in a different machine.
what is the command to export the .csv file into database using shell script.
Thanks in advance. (3 Replies)