Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2013
    Posts
    4

    Unanswered: How to view .sql file as PDF or word

    Hello all, brand new here and glad to be here.

    I have many questions, but one that I have been trying to figure out is this one. I have an sql file from one of my sites dating back about 5 years and I need to extract the users to a viewable file so that a common person could see. A PDF file is preferable but an excel would also work or even a word document. The users to my site chooses a username and password and then supplys their email. I am just trying to get this in an viewable output file rather then "notepad" which I can only see right now.

    So my main questions is... What Free program can I use to extract this information from an SQL file taken from my site? I know I probably need to get more info for you as I will monitor this.

    Many Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    stuff it into a server
    then run a query
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jan 2013
    Posts
    4
    Thanks,

    When you say stuff it in a server, do you mean any sever that I canto log into my cpanel and click on phpadmin or mysql and run it? I extracted the database off of the site, but leaving the site intact with the database. The file ended up viewable in notepad but in raw form with comams and it was horrizontal. I need to be able to send this file as a pdf, word or excel file so that it can be printed out.

    Sorry if I am confusing you but I am not the best (probably one of the worst) at databases but need to be able to print out the users and such. I really appreciate the help. The main fear I have is messing up the site that has the users, passwords and email addresses in it. I appolagize once again for being confusing

  4. #4
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    If you have the data in a delimited file, you could load this directly into Excel.

    Possibly i have misunderstood something?

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    by stuff it into a server I mean load the data into a db server
    then extract the data as required
    whether thats into a spreadsheet or similar up to you

    for all I know you may also be able to upload the SQL file into an Access/JET db
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jan 2013
    Posts
    4
    Thanks both of you I will try it. The file it is currently is xx.sql, when I backed up the site, the hosting company made this file with the information. I have Excel and Aceess but from 2003. As far delimited file, I am unsure what that means.

    The one thing that I am trying to avoid is to do any damage from the database on my site that contains all the users , information and emails and such (I would be ruined if that hapended, but the hosting company did back it up). I am just hoping this file (filename.sql file viewable to me in notepad on my XP machine but it is raw and the info is horrizontaly based with commas and such.) that the hosting company out on my server when they did the back up "could be opened and viewed as a regular docment or excell that could be printed."

    Once again many thanks for all the help and I applagize for a this question that is noobish to me. The main signifigance is that it has to be in a pdf viewable form when I send it out to the parties that are requesting it.

    I will try the suggestions in the meantime. and many thanks again.

  7. #7
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    As far delimited file, I am unsure what that means
    .If the data you can "see" in notepad is separated by commas, you should be able to import this directly into Excel. I do not understand "with commas and such" . . .

    If the data seen in notepad has not been saved to a file, save it to a file and import this file into Excel.

    This is how most of my clients move data for use on another system.

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    when you open the xx.sql file, which was created by a mysql backup, you will see that it contains CREATE TABLE and INSERT statements

    you have to run the file into an empty database in order to "restore" it

    this is what the guys mean by "stuffing" it into a server
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    Jan 2013
    Posts
    4
    Many thanks again, I think I am on to something from both your advice, on one of my other servers I created a database and was able to convert it to a PDF just missing a little info but this probably due to the setup. I will work on it more after I get back but I think this answered my question from the great help.

    You guys are awesome. And thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •