Announcement

Collapse
No announcement yet.

Opening a database

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Opening a database

    I run more than one forum. I moved one to this server last night, but the sql dump wasn't having anything to do with inserting into this server's database.

    Question is, can I access the database and get posts out of there? If so, how? I need posts that were posted by one specific user.

    Rapscallion

  • #2
    Quoth Rapscallion View Post
    I run more than one forum. I moved one to this server last night, but the sql dump wasn't having anything to do with inserting into this server's database.

    Question is, can I access the database and get posts out of there? If so, how? I need posts that were posted by one specific user.

    Rapscallion
    I do not know the specifics of how databases for a forum works, but I'm assuming it's the same as any other SQL database. You need to first find out how the database is structured. Find out what the field is that stores the poster's user name then run a SQL search query on that name and field. This is assuming you are using an SQL database.

    It should be something along the lines of:

    SELECT * FROM <Database_Name> WHERE <Username Column> = '<username>'

    I do some development where I have to interact with databases so my knowledge is not at all complete. I hope that I read and understood your question correctly and that I may have answered...or at least given you an idea of where to go. If this wasn't what you were going after or already know this stuff, sorry I probably just misread the question.

    Comment


    • #3
      Er, which program do you use to do the searching? I know it's SQL (Structured Query Language), but I don't know how to go into them.

      Rapscallion

      Comment


      • #4
        Quoth Rapscallion View Post
        Er, which program do you use to do the searching? I know it's SQL (Structured Query Language), but I don't know how to go into them.

        Rapscallion
        Unfortunately, that's where my knowledge ends. We have our own database architect that deals with that stuff and all I do is retrieve and store information into that database. My first guess would be to take a look at something like MySQL or MS SQL Server 2000. Btw, you the database is probably set up as a relational database so you may have to look across multiple tables via foreign keys to get the post information you want. Hopefully, someone on here who knows a little bit more about database programs can help you.

        Comment


        • #5
          vBulletin uses MySQL. There are a couple different ways you can get into the MySQL Database.

          MySQL Query Browser will allow you to connect to a MySQL Database and run query strings on it. Information on it here: http://mysql.com/products/tools/query-browser/
          The GUI Tool Downloads: http://dev.mysql.com/downloads/gui-tools/5.0.html

          I don't know about the database structure to help. If I have time, I will try to see if I can find the database table structure.

          Comment


          • #6
            Depending on how you connect to the database. MySQL has a software that allows you to browse the database, users, logs, etc... called "Query Browser" (ringo was nice enough to provide a link).

            But since you're an admin of the database, I'm guessing you're using MySQL. You might want to look at the admin software that MySQL also provides.
            I've lost my mind ages ago. If you find it, please hide it.

            Comment


            • #7
              phpMyAdmin

              Most servers that will run mySQL will also have a program called phpMyAdmin running. You can usually get to it through the admin panel of the server. It lets you look at the tables in your web browser. I have found it helpful when I have run forum sites in the past. Here is the link for the site: phpMyAdmin

              Comment


              • #8
                I've downloaded the sql dump from the previous server. I need to search through that sql file. Any advice about applications for doing that on my own PC rather than the server?

                I'll check out those applications above later when I get home. It was a phpBB2 board for reference.

                Rapscallion

                Comment


                • #9
                  phpBB2, I believe will connect to either MySQL or SQL Server. But since it cost money for SQL Server and nothing for MySQL. I'm going to guess they used MySQL.

                  What you want to do is export from the database to a file on your computer. I'm not sure if Query Browser will do that. It's been a while since I've messed with MySQL. You'll need a database software on your computer that can accept the data (as well as save it into a file database).
                  I've lost my mind ages ago. If you find it, please hide it.

                  Comment


                  • #10
                    I already have the database sat in a file on my computer. What I need is the name of a database software (free for preference) to open it up and have a good browse. Suggestions, please.

                    Rapscallion

                    Comment


                    • #11
                      You should be able to open up the database dump though Excel.

                      As for accessing it, if you have a LAMP or WAMP server, try getting phpMyAdmin running on it and hop onto it from another computer. phpMyAdmin is a very easy MySQL management program.

                      Was the other forum also vBulliten?

                      Most databases should accept other's unless your hosting company does not allow importing a database (unfortunately, like mine).

                      *Edit*

                      Duh, if you have a profiessional version of MS Office, try Access. It's crude, but may get the job done. If not, Excel should be able to do it. Too bad php can't be run locally.

                      *Edit part deux*

                      Rap, I'm booting up my other PC right now, if you have any of these, send me a yell:

                      AOLIM: Draggardevir
                      ICQ - 2096329 (Draggar Devir)
                      MSN: draggardevir at hot mail dot com(I'm trying to remember my password for this one)

                      It's only 9pm your time, you should still be up.
                      Last edited by draggar; 07-11-2007, 07:43 PM.
                      Quote Dalesys:
                      ... as in "Ifn thet dawg comes at me, Ima gonna shutz ma panz!"

                      Comment


                      • #12
                        I'm going to bed soon but I'll be online most of the day tomorrow, send me an IM from the list above, even if I'm away it will go though and I can respond when I am up and available.
                        Quote Dalesys:
                        ... as in "Ifn thet dawg comes at me, Ima gonna shutz ma panz!"

                        Comment


                        • #13
                          Heya Raps, here's my advice: Download MySQL from here : http://www.mysql.com/ and make sure to download the latest version. It's free, and can be run on Windows.

                          After doing that, there's a set of gui tools available in the bin directory of the installation (though I am unable to remember the names, and don't have a Windows machine to look at them). Just double-click until you see something come up on screen.

                          Once there, you can restore the database dump. After that, you can get at the data in any number of ways, though if you prefer local access, I would recommend installing the MySQL ODBC COnnector, and using MS Access to get at it.

                          You can also try to use SQLite (http://www.sqlite.org/ ), and that will likely work, but may be harder to use, and I have less advice on how to do so.

                          Hope that helps somewhat.

                          Comment


                          • #14
                            Actually, I found that opening it in wordpad gets some results - it's not pretty or user-friendly, but I can search for most of the stuff I'm looking for.

                            I think.

                            I'll get back to you.

                            Rapscallion

                            Comment


                            • #15
                              Not bad, if messy.

                              Excel you can filter the rows so you can filter them by the user# (you'll have to go into the user part of the DB to get that)
                              Quote Dalesys:
                              ... as in "Ifn thet dawg comes at me, Ima gonna shutz ma panz!"

                              Comment

                              Working...