Unanswered: how to read sql file in excel format ?
I have an sql file, but I want to read it in the form of an excel sheet. Do you have any suggestions, how can i convert sql into excel or any such readable format ? Or are there any free tools which does the same ?
I think the easiest way of reading in some type of tabular form would be to apply the SQL file into a database and then using "mysql --html" run a select statement against this. The result of this is your data in HTML table format which can be viewed with a browser. You can then even from the browser copy the table and apply it into an Excel spreadsheet.
I am totally new to databases.
I actually have a dump sql file (filename.sql) with me, which I am trying to import it in mysql database. I have found the following command for it.
mysql < filename.sql
The goal is, after importing, i would be able to see the tables and I somehow want it all in the form of excel sheet or csv format. And so, as Ronan suggested, I would then try using "mysql --html" and run the select statements (i still need to try and figure out after that, how it works though).
But for now, the above command to import the dump file shows me an error all the time. It says I need to check the syntax with every version of the mysql. I am using 126.96.36.199, and refering to its manual as well and the above command is as per that. I still dont understand why do I get errors. Or sometimes it says, "database file not found".
Or am i missing something?
I apologize if this seems to be a very small and silly query? But i am just stuck with it.
Are you sure that your mysql server is running? If it is then it sounds like you have some SQL that is automatically executed when you run the mysql command. This is usually configured in your local copy of my.cnf.
It is running, because I am able to run other normal commands like SHOW, CREATE, SELECT, etc. I also just checked with another laptop, with the same version of mySQL. But it shows me the same error when I type "mysql" or "mysql < filename.sql"
Could you may be tell me how can I solve or configure this ? I would try it out then.
It works with this finally.. I thank you so much.. It was just a very long file.
And now, just last thing i would again bother you with..
I want to get it in a file in the form of tables or the excal sheet as I said (xls or csv), so that it gets easy to read.
I guess i need to write select statements for each table and put one by one in a file ? And If yes, could you only tell me the command to put them all in a file.