View Full Version : Getting started with MySQL
mat106
01-24-2005, 01:51 AM
Hi.
I'm completely new to MySQL. My host has MySQL installed and i'd like to experiment with using it but don't know how to get started. I know i have to create a table and put some data in it but i don't know how to connect to the server or database (if that's what i have to do?!?)
Where would i go to get started?
Brandoe85
01-24-2005, 01:54 AM
Search google for mysql tutorials. http://www.google.com/search?hl=en&q=mysql+tutorial&btnG=Google+Search
mat106
01-24-2005, 01:56 AM
Yeah i've done that but any tutorial i read seems to assume that i know how to connect to the database which i don't :(. I haven't installed MySQL locally. It's on the hosts server.
Brandoe85
01-24-2005, 02:06 AM
You host should provide you with what you need to connect to it. Do they provide you with phpmyadmin or something in that matter that lets you connect? If not, you'll have to contact them and see how you can connect.
mat106
01-24-2005, 02:08 AM
Thanks. Will check and see.
Yaggles
01-24-2005, 07:50 AM
If your host has CPanel on their server and allows you to access the mysql part, then it should have your database name and database username with a string for connecting to it with PHP and Perl. An example is:
<?
$dbh=mysql_connect ("localhost", "username", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("database");
?>
That is how you do so in PHP.
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.