Knowledge Base Navigation

Articles: 51 Categories: 8

KB Article: Setting Up Your MySQL & phpMyAdmin

Article:Setting Up Your MySQL & phpMyAdmin     Popular
Submitted By:Amras_Ancalimon
Date Added:10-30-2004 3:18:56
Hits:6,852



Tutorial / How-To

Setting Up Your MySQL & phpMyAdmin For The First Time

This tutorial will show you how to set up your MySQL and your phpMyAdmin with ease,
regardless of whether you are going to be using PHP Nuke or PHP Nuke Platinum.
The process is still the same.

01. Log into your CPanel with your User Name and Password.

02. Click on MySQL icon, as indicated (fig_01)


03. Now, we need to create a database also known as Db (fig_02). Your User
Name will
make up part of the necessary details, but you don't need to do this
as it will be
done automatically. The User Name Is the same as the one used
to log into your CPanel.


04. In the box indicated, add a name for your Db.

05. As you can see here, (fig_03) I have used the name nuke01 for my Db.
But you can call it whatever you want. Now click the "Add Db" button.


06. As indicated by both arrows, your Db has now been added to your
User Name.
There is no need to add an under score, _ when creating a
name for
your Db as this too will be added automatically.


07. Okay, now that’s done, we need to create a specific Db Username & Password,
(fig_05). Again, don't have your username too long, keep it
short as possible.


08. Now that you have added your Db Username and Password, click the
"Add User" button, (fig_06)


09. As you can now see (fig_07), arrows 1 & 2 indicate the created Db, Username
and Password
that we've created. Now make sure that in Privileges, that the "All" box has been ticked (arrow 3).
Once that is done, you can now click on the "Add User to Db" button,
as shown
with arrow 4.


** I would now write these details down, as you will need them again later. **

10. As indicated by arrow 1, (fig_08) the next logical step is the Access Hosts or localhost.
In the main, the vast majority of hosts, don't need require you to change this, if they do, then they
will supply you with the necessary details to add here. As we don't need to add anything
at this time, we'll skip it. Arrow 2 now indicates the link for phpMyAdmin. Click on it.


11. Okay, now we have phpMyAdmin open. Where the arrow is indicated, click on the "Databases" link (fig_09).


12. Now click on the named Db (whatever you named it), as indicated (fig_10)


13. Now click on the "SQL" tab as indicated (fig_11). We now have to upload the SQL file to your Db.


14. Depending on whether you are using Nuke or Nuke Platinum, this file be called nuke.sql or
platinum.sql. This file should be located in the sql folder of the extracted application you previously
downloaded. Click the "Browse" button and find the said file (fig_12).


15. Now click the "Go" button to upload the file (fig_13).


16. If all goes well, all the tables that are contained in the sql file will now be uploaded and should
look like this, (fig_14).


17. You can now log out of phpMyAdmin & CPanel.

18. We now need to amend the details in config.php with the details you hopefully wrote down earlier.
Now go to the root/html section of you nuke/platinum folder and locate the config.php file. You can
open this with any decent text editor. Now look for this section
in the file....

$dbhost = "localhost";
$dbuname = "";
$dbpass = "";
$dbname = "";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "MySQL";
$sitekey = "xa7huqARup47ruvUwR3YerepAphesw";
$gfx_chk = 0;

19. Anything that gets changed here, MUST be placed between the speech-marks... ""

- Line 1 - If you didn't have to change the localhost in Step 10, then leave this line alone.
Otherwise, change localhost for whatever you changed it to earlier.
- Line 2 has to contain your Db Username as set up previously
- Line 3 has to contain your password as set up earlier
- Line 4 has to contain your Db name as set up before.
- The rest can stay as they are.

Your details should resemble those below...

$dbhost = "localhost";
$dbuname = "matrixw_MyNameHe";
$dbpass = "mypasshere";
$dbname = "matrixw_nuke01";
$prefix = "nuke";
$user_prefix = "nuke";
$dbtype = "MySQL";
$sitekey = "xa7huqARup47ruvUwR3YerepAphesw";
$gfx_chk = 0;

Now save the file, with the original name - config.php

You can now upload everything to your server, to the folder named public_html.

Thats it, Job Done !!!

All you need to do now is to create yourself an account (SuperGod).
That will be mentioned in another tutorial coming soon, but if everything is done correctly,
what you should now see on your index.php page should be self-explanatory.

Current rating: 6.35 by 112 users
Please take one second and rate this article...

Not a Chance 12345678910 Absolutely

Please register or sign-in to post comments.


Jump to a selected article...