Closed Thread
Results 1 to 2 of 2

Thread: Installing phpMyAdmin / Running a Query with phpMyAdmin

  1. #1
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    29
    Posts
    13,647

    Exclamation Running a Query using phpMyAdmin

    Here are step-by-step instructions to run a query via phpMyAdmin, which is available at http://www.sourceforge.net/projects/phpmyadmin/ for free.

    1] Go into phpMyAdmin. On the left side, click the name of the database you are using for vBulletin.
    2] On the right side, once the page loads, scroll down and find the box that says "Run SQL query/queries on database yourdatabasename" above it.
    3] In that box, type (or copy and paste) the query you were told to run.
    4] Press the Go button.
    5] If your query is successful, it will reload the page and at the very top say "xxx has been yyy" where xxx is the name of the table or field you performed yyy action on, or give a blank white screen. Otherwise, it will give an error message. If it gives an error, copy that error and come back to the thread where someone is helping you and post it there.

    Adding new download URL -jamesus
    Last edited by JamesUS; Tue 14th Aug '01 at 2:24pm.

  2. #2
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    29
    Posts
    13,647

    Installing phpMyAdmin

    This tutorial will help you install phpMyAdmin, which can be unbelievably helpful when you need to get a quick look at data in your database, or when you just need to run a query.

    First, you will need a few things. One is the config.php file from your vBulletin installation, because we will need some of the information out of it. Second is your FTP program. And last, but not least, is of course the phpMyAdmin files themselves. You can obtain them at http://www.sourceforge.net/projects/phpmyadmin/ - you can either download a standard Windows ZIP file, or a tar file for use directly in Unix. I recommend you get the .php extensions, zip version, unless you know what you are doing.

    Assuming you grabbed the Windows ZIP file, open it up in your favorite ZIP program, and unzip it. You should get a directory called phpMyAdmin and a subdirectory called images.

    Open up config.inc.php in your favorite ASCII text editor (such as Notepad, TextPad, EditPlus, etc.). You will need the following info to complete this portion of the tutorial:
    • MySQL hostname (usually 'localhost', can also be a host such as db.myhost.com or an IP address such as 129.123.141.122)
    • MySQL database name
    • MySQL username
    • MySQL password
    • MySQL port number, if non-standard (your host will most likely provide this if it is non-standard)
    From here it is just a matter of filling in the values where they need to be. We'll work with some sample values. They are:
    • Hostname: db.myname.f2s.com
    • Database name: mydb
    • Username: myname
    • Password: mypass
    • Port Num: 3307
    And here are those values filled out in a copy of the actual config.inc.php file.
    $cfgServers[1]['host'] = 'db.myname.f2s.com'; // MySQL hostname
    $cfgServers[1]['port'] = '3307'; // MySQL port - leave blank for default port
    $cfgServers[1]['adv_auth'] = false; // Use advanced authentication?
    $cfgServers[1]['stduser'] = 'root'; // MySQL standard user (only needed with advanced auth)
    $cfgServers[1]['stdpass'] = ''; // MySQL standard password (only needed with advanced auth)
    $cfgServers[1]['user'] = 'myname'; // MySQL user (only needed with basic auth)
    $cfgServers[1]['password'] = 'mypass'; // MySQL password (only needed with basic auth)
    $cfgServers[1]['only_db'] = 'mydb'; // If set to a db-name, only this db is accessible
    $cfgServers[1]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
    If your host requires advanced MySQL authorization, you will need to fill in the stduser and stdpass items instead of user and password, but the rest is the same.

    Open up your FTP program. Create a directory with a name that you will remember but that is *not* phpmyadmin or anything similar to that.

    At this point you should determine how to password protect a directory on your server. If your host provides any kind of webmaster control panel, such as CPanel or WHM, that would be a very good place to start. As it varies significantly from host to host, that is outside the scope of this tutorial and you will need to ask your host how to accomplish this. But you must password-protect this directory. If you don't you are leaving yourself open for people causing havoc with your database(s).

    Once you have password-protected this directory, you are ready to upload the files.

    Upload all of the files to the new directory. You do not need to upload language files other than the one you plan to use - for most people that will be english.inc.php. The language files are:
    • english.inc.php
    • bulgarian-win1251.inc.php
    • chinese_big5.inc.php
    • chinese_gb.inc.php
    • danish.inc.php
    • french.inc.php
    • dutch.inc.php
    • german.inc.php
    • italian.inc.php
    • norwegian.inc.php
    • polish.inc.php
    • portuguese.inc.php
    • russian-koi8.inc.php
    • russian-win1251.inc.php
    • spanish.inc.php

    At this point, you should have all of the files uploaded, including your edited config.inc.php file.

    You can now go to
    http://mysite.com/installdir/
    and you should receive a prompt to login, assuming you password-protected the directory. You will then see the database name on the left, and a welcome message on the right.

    To begin, click the database name on the left. It will change the right screen to display information about your database and will expand the left side to include a list of the tables in your database. From here you can run queries:


    or browse tables:


    You can also click on a table name on the left to see more options for it, including a list of columns and options for them:


    You can also insert new rows of data:


    You should be all set up. Please note, phpMyAdmin is not made or supported by Jelsoft, and therefore we cannot officially answer any questions about it. If you are having problems, you are welcome to post in our PHP or MySQL forums.

    Make sure not to put phpMyAdmin in a publicly accessible directory. Ideally it should be password protected, as there are known security issues with the software.
    Last edited by JamesUS; Tue 14th Aug '01 at 2:25pm.

Closed Thread

Similar Threads

  1. What phpmyadmin query do I run
    By Cloud Strife in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 2
    Last Post: Mon 21st Jul '03, 8:29pm
  2. Installing phpMyAdmin 2.3.0 rc2
    By aquariumpros in forum PHP & HTML Questions
    Replies: 2
    Last Post: Mon 15th Jul '02, 9:34pm
  3. PHPMYADMIN running sql query for
    By xsngx in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 6
    Last Post: Mon 15th Apr '02, 9:37pm
  4. Installing phpmyadmin
    By mohican in forum PHP & HTML Questions
    Replies: 0
    Last Post: Wed 8th Aug '01, 9:10am

Bookmarks

Posting Permissions

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