Sun Nov 08, 2009 10:19 am - How To Test Mysql Database Connection
#2690
How To Test Mysql Database Connection
Hello,
Welcome to Webune Support Forums - We provide PHP hosting with MySQL database. Our support and service is umnatched. we are delelopers like you and we know what PHP developers needs.
Today we are sharing a very useful script written in php to test you database connection. this easy and simple to use script will help you confirm the login information you have been given it correct.
for example. lets say you have a script which uses a MySQL database, but you are getting connection errors like:
Access denied for user 'admin'@'localhost' (using password: NO)
this error simply means you dont have the correct database information like your username because the script tried to connect to your databse but it was unseccessful.
if you dont want to download the script provided in this post, you can create the script yourself by following the steps provide on this post: Testing Mysql Database Connection Script
step 1. download the script provided in this post
step 2. unzip it and upload to your server where you have PHP and a MySQL database.
step 3. once you have uploaded to your site, test it by accessing the script to where you place it in your site. for example:
http://www.example.com/testmysql/test-mysql.php
please give us any comments or tips.
Thanks
Webune Support Team
Welcome to Webune Support Forums - We provide PHP hosting with MySQL database. Our support and service is umnatched. we are delelopers like you and we know what PHP developers needs.
Today we are sharing a very useful script written in php to test you database connection. this easy and simple to use script will help you confirm the login information you have been given it correct.
for example. lets say you have a script which uses a MySQL database, but you are getting connection errors like:
Access denied for user 'admin'@'localhost' (using password: NO)
this error simply means you dont have the correct database information like your username because the script tried to connect to your databse but it was unseccessful.
if you dont want to download the script provided in this post, you can create the script yourself by following the steps provide on this post: Testing Mysql Database Connection Script
step 1. download the script provided in this post
step 2. unzip it and upload to your server where you have PHP and a MySQL database.
step 3. once you have uploaded to your site, test it by accessing the script to where you place it in your site. for example:
http://www.example.com/testmysql/test-mysql.php
please give us any comments or tips.
Thanks
Webune Support Team
Attachments
NOTE: You MUST be Logged in to be able to download this Attachment.
testmysql.zip
(2 KB) - Downloaded 37 Times
Login | Register
author: Webune Tutorials
Safe Download: 0 Viruses Found