logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Webmaster Tools & Utilities View previous topic :: View next topic
Reply to topic   Topic: MySQL info script
Author
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Sun 27 Aug '06 21:03    Post subject: MySQL info script Reply with quote

With MySQL I missed a script like phpinfo for php.

I made a simple PHP script for testing a MySQL connection and viewing the Mysql settings. Also it shows the MySQL Runtime Information and MySQL Server variables and settings. Also I included phpinfo().

Download at www.apachelounge.com/download/mysqlinfo.zip

I hope you like it and additions are welcome.

Steffen
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 27 Aug '06 21:47    Post subject: Reply with quote

For testing MySQLi you can add this

Code:

if(extension_loaded("MySQLi")){
   $mysqli = new mysqli($host, $user, $password);

   /* check connection */
   if (mysqli_connect_errno()) {
          printf("Connect failed: %s\n", mysqli_connect_error());
          exit();
   }

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();

}
else
{
echo "MySQLi not loaded";
}
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Tue 29 Aug '06 18:50    Post subject: Reply with quote

Update:
I updated the script with a install check. It gives notice when the mysql extension is not found and gives hints when it cannot connect to a MySQL server.

Steffen
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 18 Oct '06 14:52    Post subject: Reply with quote

Scott Furry has made a mysqlinfo script for the mysqli extension. I included it in the .zip at the download page.

A big thanks! Scott,

Steffen
Back to top


Reply to topic   Topic: MySQL info script View previous topic :: View next topic
Post new topic   Forum Index -> Webmaster Tools & Utilities