Collections:
Retrieving MySQL Server information in MySQL
How To Get Some Basic Information Back from MySQL Servers in MySQL?
✍: FYIcenter.com
Once you got a MySQL server connection object successfully, you can use mysql_get_server() and mysql_get_host_info() to get some basic information from your MySQL server. The tutorial exercise below is a good example:
<?php
$con = mysql_connect('localhost:8888', 'dev', 'iyf');
if (!$con) {
print("There is a problem with MySQL connection.\n");
} else {
print("The MySQL connection object is ready.\n");
print(mysql_get_client_info()."\n");
print(mysql_get_server_info($con)."\n");
print(mysql_get_host_info($con)."\n");
mysql_close($con);
}
?>
If you run this script, you will get something like this:
The MySQL connection object is ready. 4.1.7 5.0.24-community-log localhost via TCP/IP
⇒ Close MySQL Connection Objects in MySQL
⇐ Accessing MySQL Server through Firewalls in MySQL
2017-11-11, 2331🔥, 0💬
Popular Posts:
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can u...
How to download and install the scaled-down database AdventureWorksLT in SQL Server? If you want to ...
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once y...
How To End a Stored Procedure Properly in SQL Server Transact-SQL? Where the end of the "CREATE PROC...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...