# MySQL Database

**URL:** <https://forum.kirupa.com/t/mysql-database/62756>\
**Category:** programming\
**Created:** [August 31, 2004, 2:53am UTC](https://forum.kirupa.com/t/mysql-database/62756 "2004-08-31T02:53:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)\
**Post date:** [August 31, 2004, 2:53am UTC](https://forum.kirupa.com/t/mysql-database/62756/1 "2004-08-31T02:53:01Z")

</div>

Hello,  
I was wondering if someone could tell me what a password row in a mysql database and its specs. I am not sure what type it should be, etc.

---

<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:** [August 31, 2004, 5:38am UTC](https://forum.kirupa.com/t/mysql-database/62756/2 "2004-08-31T05:38:58Z")

</div>

Make it simple text, but apply an MD5 function to it so that when you write the password to it, it gets converted to an md5 value. Later, to check passwords, you use for example php’s md5() function to compare the md5 of the user input with the md5 stored in the dbase.

---

<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:** [August 31, 2004, 3:47pm UTC](https://forum.kirupa.com/t/mysql-database/62756/3 "2004-08-31T15:47:07Z")

</div>

Hmmm, could you explain that again I really didn’t understand everything. Also, what would the values of a password row in a mysql database be?

---

<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:** [September 1, 2004, 3:14am UTC](https://forum.kirupa.com/t/mysql-database/62756/4 "2004-09-01T03:14:51Z")

</div>

> [@Voetsjoeba](#):
>
> Make it simple text, but apply an MD5 function to it so that when you write the password to it, it gets converted to an md5 value. Later, to check passwords, you use for example php’s md5() function to compare the md5 of the user input with the md5 stored in the dbase.

VoetStalker is right. VARCHAR should work, because you’ll be using (hopefully) a hashing function such as MD5(). Google MD5 Hash and/or encryption, or look in the php docs if you don’t understand.

---

<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:** [September 1, 2004, 2:36pm UTC](https://forum.kirupa.com/t/mysql-database/62756/5 "2004-09-01T14:36:02Z")

</div>

Ok, but are there any other values it needs to be? Like unique or something?

---

<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:** [September 2, 2004, 3:16am UTC](https://forum.kirupa.com/t/mysql-database/62756/6 "2004-09-02T03:16:13Z")

</div>

nope, there isn’t much configuration you can do in mysql.

---

<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:** [September 2, 2004, 4:08am UTC](https://forum.kirupa.com/t/mysql-database/62756/7 "2004-09-02T04:08:22Z")

</div>

Example

```auto

CREATE TABLE users (
id INT(3),
user VARCHAR(255),
password VARCHAR(255),
PRIMARY KEY (id)
);

```

Very basic with few fields but … thats about it.

---

<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:** [September 8, 2004, 8:29pm UTC](https://forum.kirupa.com/t/mysql-database/62756/8 "2004-09-08T20:29:38Z")

</div>

Where can I learn about hash etc or any tutorials on that stuff.

---

<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:** [September 10, 2004, 8:53am UTC](https://forum.kirupa.com/t/mysql-database/62756/9 "2004-09-10T08:53:31Z")

</div>

[www.php.net](http://www.php.net) :), they cover most of them. However using Google aint such a bad idea either 🙂
