Google
 

Linux Distro Counter

Welcome to Open Source Software and Linux Blog.

Hi, everyone!. I just created this blog to share knowledge about open source software and Linux. If you all have knowledge and info related to open source / Linux, please share or send me an email. Thanks ^_^

Monday, August 13, 2007

How to: Know your mysql and php is connect properly

How to know your mysql and php is connect properly. From my experience I like to share this knowledge.

1) Install the php and mysql in Linux properly with common configuration.
2) Create user and set the password in your database.
2) Create a php file like testdb.php and follow this code. Save it and transfer this file to your webroot. For examples on redhat base is /var/www/htdocs/html or Suse /srv/www/html.
3) Open your browser and type such as http://localhost/testdb.php

If success, the result will show you like
Connecting... Using training2

No comments: