I've got a little project going, here where I work, and I need a little bit of help with MySQL.
This is an opportunity to make some inroads for Linux and open source software in the company, if I can get this one task to work.
Anybody here (or know of) a wizard with MySQL that wouldn't mind giving me some advice?
Help! I need to "talk" with a MySQL Wizard!
Moderators: snarkout, Patrick, dann
Re: Help! I need to "talk" with a MySQL Wizard!
What do you need? I'm not a wizard, but I know SQL more or less, and have MySQL running on my server.Judland wrote:I've got a little project going, here where I work, and I need a little bit of help with MySQL.
This is an opportunity to make some inroads for Linux and open source software in the company, if I can get this one task to work.
Anybody here (or know of) a wizard with MySQL that wouldn't mind giving me some advice?
Usually it's a matter of dealing with some frontend to MySQL rather than MySQL itself, unless you're talking about writing your own software. I use the mysql shell, and a little Perl.
Hopefully somebody here can help if you let us know what you need.
The particulars:
I've setup an eGroupWare server at the office on this Linux box hidden (away from the office IT guys) under my desk.
We have this internal accounting system that I want to export data from (in a CSV file most likely) and import this into one of the MySQL databases existing in the eGroupWare system.
This is project information that I'd rather not have to re-type from one system to the other.
If I can show my manager that someone would be able to easily take data from our exisiting system and import the basics of it into the eGroupWare system, it would be a much easier sell for me.
How difficult is it to import CSV (suggestions for easier methods of importing accepted) into a MySQL database? What would I need to do, or where could I go on the Net to learn how to do this sort of thing?
I've setup an eGroupWare server at the office on this Linux box hidden (away from the office IT guys) under my desk.
We have this internal accounting system that I want to export data from (in a CSV file most likely) and import this into one of the MySQL databases existing in the eGroupWare system.
This is project information that I'd rather not have to re-type from one system to the other.
If I can show my manager that someone would be able to easily take data from our exisiting system and import the basics of it into the eGroupWare system, it would be a much easier sell for me.
How difficult is it to import CSV (suggestions for easier methods of importing accepted) into a MySQL database? What would I need to do, or where could I go on the Net to learn how to do this sort of thing?
You can also use mysqlimport from a shell.yeti wrote:try something like:
LOAD DATA INFILE '/tmp/myfile.csv' INTO TABLE mytable FIELDS TERMINATED BY ',' IGNORE 1 LINES
mysqlimport --local=1 --fields-terminated=, -c field1,field2,... -u yourname -p -h yourhost yourdatabase yourimportfile
One of the limitations is that the import file must be named the same as the table you are importing into.
Thanks, everybody, for the replies and the help.yeti wrote:try something like:
LOAD DATA INFILE '/tmp/myfile.csv' INTO TABLE mytable FIELDS TERMINATED BY ',' IGNORE 1 LINES
This worked like a charm! Now I'm armed with a tool that is sure to silence a few nay-sayers.
Now, I'm off to work on the presentation portion of this project.
Thanks again!