Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 02-01-2005, 03:40 PM   PM User | #1
Xko
New Coder

 
Join Date: Feb 2005
Location: Birmingham, England
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Xko is an unknown quantity at this point
Post MySQL Newcomer needs help

Hey folks,

First time i've used MySQL so please be gentle...

Well i have recently downloaded MyPHPVote bit of code for my site. Thing is i need to enter to information in a .php file but i'm unsure what it to put...

Here's where i get stuck...

Code:
<?php
$MySqlHostname = "localhost";
$MySqlUsername = "root";
$MySqlPassword = "";
$MySqlDatabase = "triphp";
$ServerConnect = mysql_connect("$MySqlHostname","$MySqlUsername","$MySqlPassword")or die ("Problem:Couldn't connect to MySQL Server.");
$DatabaseConnection = @mysql_select_db("$MySqlDatabase", $ServerConnect)or die("Problem: Couldn't select the $MySqlDatabase Database.");
?>
And it tells me to "Change the above lines according to my own config".

But what's my own config?

Any pointers would be much appreciated!
Xko is offline   Reply With Quote
Old 02-01-2005, 08:56 PM   PM User | #2
dmc
New to the CF scene

 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
dmc is an unknown quantity at this point
Your own config means in this case your db.
You got yourself a mysql database in example called: triphp

Every database has a user and a pass

Db: triphp
user: dbuser
pass: dbpass

You have to fill these settings with your database name user and pass
$MySqlHostname = "localhost"; <-- localhost is its own server always default and the right settings

$MySqlUsername = "dbuser";
$MySqlPassword = "dbpass";
$MySqlDatabase = "triphp";

I hope this info will help
dmc is offline   Reply With Quote
Old 02-01-2005, 10:22 PM   PM User | #3
Xko
New Coder

 
Join Date: Feb 2005
Location: Birmingham, England
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Xko is an unknown quantity at this point
Great! Thanks for that, seems relatively easier...for now.

Cheers bud.
Xko is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:41 PM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.