# MySQL database conn with PHP

**URL:** <https://forum.kirupa.com/t/mysql-database-conn-with-php/78372>\
**Category:** programming\
**Created:** [February 3, 2005, 9:35pm UTC](https://forum.kirupa.com/t/mysql-database-conn-with-php/78372 "2005-02-03T21:35:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imagined](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@imagined](https://forum.kirupa.com/u/imagined)\
**Post date:** [February 3, 2005, 9:35pm UTC](https://forum.kirupa.com/t/mysql-database-conn-with-php/78372/1 "2005-02-03T21:35:24Z")

</div>

Ok. I have worked with PHP before. I just installed PHP and MySQL in my laptop. PHP works just fine. I installed MySQL and am able to create databases and tables through the COMMAND PROMPT. I created a connection file that contains the following code:

```php
$conn = mysql_connect("localhost", "user", "password");
$mysql_select_db("troubleticket", $conn);

```

Of course, instead of “user” and “password” I typed the real thing. When I go to my browser I get this error message:

* * *

Warning: mysql\_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Apache2\htdocs roubleticket\conn.php on line 2

Fatal error: Call to undefined function: () in C:\Apache2\htdocs roubleticket\conn.php on line 3

* * *

What am I doing wrong? I used to do this all the time before? Is it the new MySQL version?

Thanks in advance,

Leo :puzzled:
