Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm new to the SQL world - help

Status
Not open for further replies.

n3lson

Technical User
Sep 16, 2002
17
0
0
US
I need really basic help on connecting to my database on a web hosting company that I have subscribed to.

They have given me the the server name,db name, username and password. But i don't know how to log on to update/ change etc. This is the first thing i've ever done with MySQL, but you have to start somewhere.

What is the popular way of connecting to a database. In the support they said to use Perl DBI (with DBD::mysql) or Mysql.pm module. Where do I find these programs/scripts?

All help will be appreciated.

n3lson
 
Best off to tell us what the scripting language you are planning on using...then we can provide more information...

for php head over to the manual to get more info...

simple php script to connect to a db

Code:
<?php
//check the password from the DB and get the access level = type
	$username = "somename";
	$pwd ="somepass";
	$host = "localhost";
	$dbname = "my_dbt";



	//connect to db
	if (!($conn=mysql_connect($host, $username, $pwd)))  {
            printf("error connecting to DB by user = $username and pwd=$pwd");
            exit;
        }
       $db=mysql_select_db($dbname,$conn) or die("Unable to connect to database1");
       
?>

You are going to have to learn about SQL, google or get a book or two to help here...


Bastien

Cat, the other other white meat
 
I'm using PHP. Where can I download Mysql.pm
module? I've searched and I can not find it.

Also, is there a GUI way to view the database through my hostway.com hosting company?

Thanks
 
Download mysql at
Check with your hosting co about what tools they have...a quick look revealed nothing about any guis


Bastien

Cat, the other other white meat
 
Where can I get Mysql.pm module?
 
You probably dont need any sort of mysql.pm module when using php to connect. Ask your hosting company if they have phpMySQLAdmin available for you to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top