This small tutorial will guide you threw the steps of running a query. Queries are often needed to to be run before a hack can work properly. If your reading a hack install file, and come across something that says "run the following queries" This is what you can do.
There are three diffrent ways to run queries. So pick which is best for you. Version 1 of 3 (Admin CP If turned on in config.php)
- Log into your Admin Control Panel (located at www.yoursite.com/forums/admincp)
- On the left menu scroll down to the very bottom. You should see "Import & Maintenance" (screenshot 1a)
- Click on "Execute SQL Query" (screenshot 1a)
- You should see "Manual Query" Go ahead and run the following query.
You must first be a
registered member to view any code.
(screenshot 1b) - You will see a message that says "Confirm Query Execution" Click continue (Screenshot 1c)
- Then you will be redirected to a "vBulletin Message" In this case "Affected Rows: 0"
- That wasn't to hard no was it?
ScreenShot A
ScreenShot B
ScreenShot C
--------------------------------
Version 2 of 3 (phpmyadmin)
- Log into phpMyAdmin. This will be located in your control panel where you are being hosted. Most sites use cPanel X.
- phpMyAdmin will be located in one of two locations.
- On the main page of your cPanelx after you have logged in. Should be a link called phpMyAdmin
- On the main page you will see "MySQL Databases" click that and scroll to the very bottom and you should see a link that says "phpMyAdmin" click it. That should log you into phpMyAdmin.
- Great now where logged in.
- Choose your forums database in the dropdown menu located on the top left hand of that page (screenshot 2a)
- After you select your forums database you will be redirected to a page with a list of things. Some should say Table, Action. Records, Type. Size, and Overhead.
- On the top you will see a link that says "SQL" Click it, that will directed you to the page were you can run queries (screenshot 2b)
- You will see a box to type in
- Go ahead and run the following query.
You must first be a
registered member to view any code.
(screenshot 2c) - a popup message will show asking "Do you really want to: DELETE FROM session. JUst press okay.
- That was easy right?
ScreenShot A
ScreenShot B
ScreenShot C
--------------------------------
Version 3 of 3 (Uploading .sql files via phpmyadmin)
- Few times you may have to upload a .sql file via phpMyAdmin.
- Log into phpMyAdmin using the instructions from the above tutorial.
- Once logged into phpMyAdmin
- Choose your forums database in the dropdown menu located on the top left hand of that page (screenshot 3a)
- After you select your forums database you will be redirected to a page with a list of things. Some should say Table, Action. Records, Type. Size, and Overhead.
- On the top you will see a link that says "SQL" Click it, that will directed you to the page were you can run queries (screenshot 3b)
You will see a box to type in and under that box will be something that says. "Or Location of the textfile " - From there you my click browse, and choose the location of the .sql file and click submit/go
- Thats it very simple!
ScreenShot A
ScreenShot B
ScreenShot C
If you have any questions about running queries, please don't not hesitate to ask how to questions in the General Hacking forum. Thanks for reading.