//MYSQL Database\\
Have you ever found a script that you like but when it got to the open page.php in a text editor and enter your correct MYSQL login data you found yourself lost?
I've found that these scripts overlook the how to create a database part. I had to have Drum create my first database because I had no idea what that was LOL but after the first time he refused to do it for me again so I had to learn, so many thanks goes out to him for making me learn it.
First thing you need to do is open you cpanel
now click on MySQL Databases
Scroll down till you see
Db: [ ] [Add Db]
If you are trying to use a counter script then name you database something like counter or if its a calendar then name it something like calendar and so on. After you have typed in what you want to name the database click on [Add Db]
Now you should be seeing Database created, click on go back.
I typed in play for this tutorial. Scroll down till you see your new database. Mine is Trixie_play
Now scroll down till you see
Username:
Password:
type in username, for mine I typed in play
then type in your password, type in anything that you will remember.
Click on Add User
then click on go back.
Now scroll down a little further till you see some drop down menus and check buttons. It should be something like
User: [something here] Db [something here]
Privileges All Alter Create temporary tables
and so on
Now where it says User: [something]
click on the scroll down arrow till you find Trixie_play and click on it
Now where it says Db: [something]
click on the scroll down arrow till you find Trixie_play and click on it.
It'll be whatever your name is plus whatever you just named your database, remember I named mine play.
Now click on Add user to Db
You should now be seeing Account added to access list. Click on go back.
Now if you scroll down to your database you just added you'll see where the user has been added to it.
That's it for creating a database.
Now to get the right info into your page that you have to edit it probably looks like this
This is just an example:
<?
/*/ Please enter your correct mysql login data! /*/
// Host of your mysql server (usually "localhost")
$server = "localhost";
// Username of your mysql database
$user = "Trixie_play";
// Password of your mysql database
$pass = "yourpassword";
// Name of your database
$mysqldb = "Trixie_play";
|
|