I've got a SQL file that needs to be parsed into something readable, like a CSV file or an excel spreadsheet.
Any one know of any tools that could do this? The SQL file is a dump from phpMyAdmin. I would like to avoid installing phpMyAdmin on a local machine if there is some software out there can could do this for me.
Is it Pipe delimited? Not exactally sure what you have with a "SQL File" but most database export functions will delimite the fields of the table with some character with the pipe (|) being most common. Most spread sheet programs can read these and use the symbol as the delimiter.
I've got a SQL file that needs to be parsed into something readable, like a CSV file or an excel spreadsheet.
Is it a 'recreate database script' kind of thing, with some CREATE TABLE at the top and a lot of INSERTs into those tables?
The simplest thing is probably to execute it, and let it do its stuff. You'll need to know abit about SQL types and perhaps dialects to decide what kind of database environment will accept those types. If you know the database it's for, use that if you can.
I've got a SQL file that needs to be parsed into something readable, like a CSV file or an excel spreadsheet.
Any one know of any tools that could do this? The SQL file is a dump from phpMyAdmin. I would like to avoid installing phpMyAdmin on a local machine if there is some software out there can could do this for me.
Mayhew, I suggest that you post the first 15-20 lines of this file so that we can better determine its type. We do not understand what you mean by the phrase, "a dump from phpMyAdmin." MySQL has an utility called "mysqlDump." Did PHPmyAdmin (a web application) use that utility to dump a MySQL database?
If it is a mysqlDump file, then re-loading it into a MySQL server and creating a new database is usually an easy task. You would not need to install any of the following software packages PHPmyAdmin, Apache, mod_php, PHP, etc.
If you download the
Hope this helps D
Is it a .sql file with all the drops, creates inserts?
As paulbain suggests, lot of hosted web site control panels export the MySQL DBs in such format.
You can run it in Access, and all the creates and inserts will be executed.
From there you would be able to manage it accordingly.
Sorry I really should read things properly before posting 😉
When I have needed to do anything with MySQL dumps in the past I have usually installed MySQL on a VM and then used standard query browsers to get the data out.
We do not understand what you mean by the phrase, "a dump from phpMyAdmin." MySQL has an utility called "mysqlDump." Did PHPmyAdmin (a web application) use that utility to dump a MySQL database?
Yes the file has phpMyAdmin written at the start of the file, so I assume the suspect made a backup straight from phpMyAdmin, or got his hosting company to send him a backup.
If it is a mysqlDump file, then re-loading it into a MySQL server and creating a new database is usually an easy task.
After trying for what seems like hours to get MySQL to talk to PHP/Apache I just used the mysql program via command prompt to import the SQL dump (it did have all the drops, creates etc) into a new database and from there I used the command
mysql> select * from TABLE into outfile 'example.text';
Then imported the file into Excel and now I can easily give this to the client. Thanks for all the replies.
It's stupid how some things are just that simple after trying all the complicated methods!
MySQL has a local client version "