# MySql

**URL:** https://forum.kirupa.com/t/mysql/21605
**Category:** programming
**Created:** [May 23, 2003, 6:08pm UTC](https://forum.kirupa.com/t/mysql/21605 "2003-05-23T18:08:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chris9902](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@chris9902](https://forum.kirupa.com/u/chris9902)
#### Post date: [May 23, 2003, 6:08pm UTC](https://forum.kirupa.com/t/mysql/21605/1 "2003-05-23T18:08:55Z")

</div>

i need to no HOW TO CREATE A MySql file or how to access it

i need to no what to do with a MySql database

```php

$host = "localhost";
$username = "thename";
$password = "mypsw";
$database = "ApronBase";
$server = mysql_connect($host, $username, $password);
$connection = mysql_select_db($database, $server);

```

Host: my host is [http://www.myjspace.com/](http://www.myjspace.com/)  
User: that is [gta.to-j.com](http://gta.to-j.com)  
Pass: well you not using that:smirk:  
Database: WHAT IS THAT :cyclops:

and the rest

here is the full code i want to use

```php
//connecting to the db
$host = "localhost";
$username = "apron";
$password = "apron123";
$database = "dbHits";
$server = mysql_connect($host, $username, $password);
$connection = mysql_select_db($database, $server);

//get the recordset with SQL
$rs = mysql_query("SELECT * FROM tbHits");
$viewers = 0;
//update the table
if($row=mysql_fetch_assoc($rs))
{
  $viewers = $row[Viewers] + 1;
}

//update the tbHits table
$sql = mysql_query("UPDATE tbHits SET Viewers = '$viewers'");

//close the db connection
mysql_close($server); 

//display the viewers
echo($viewers);

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 24, 2003, 4:41am UTC](https://forum.kirupa.com/t/mysql/21605/2 "2003-05-24T04:41:26Z")

</div>

Get this book:

> **[PHP: Your visual blueprint for creating open source, server-side content](https://www.amazon.com/exec/obidos/tg/detail/-/0764535617/qid=1053751242/sr=8-1/ref=sr_8_1/002-2551283-1162431?v=glance&s=books&n=507846)**
>
> This full color book is the only PHP title available that is designed for the visual learner. It covers over 100 tasks! Including using cookies to monitor the activity of Web site visitors to retrievi ...

I really can’t help you until you have some understanding of what you are dealing with.

I also suggest this book as well:

> **[MySQL: Your visual blueprint to open source database management](https://www.amazon.com/exec/obidos/tg/detail/-/0764516922/qid=1053751276/sr=1-2/ref=sr_1_2/002-2551283-1162431?v=glance&s=books)**
>
> \* Discusses the basic fundamentals including database terminology and concepts. \* Offers an introduction to MySQL and the SQL language, then includes essential tasks to begin using it. \* Explores the ...

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 24, 2003, 4:45am UTC](https://forum.kirupa.com/t/mysql/21605/3 "2003-05-24T04:45:00Z")

</div>

if you don’t know anything about mysql and trying to implement it, then do what jubba suggested… 🙂

anywho, you can have many databases on your mysql server, and therefore you need to specify which database are you dealing with…
