SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question how to check mysql service status from website?

    May I know is there any way to check mysql service status for my website?

    eg for php, we can use phpinfo()...
    I need help

  2. #2
    Non-Member thewebhostingdir's Avatar
    Join Date
    Oct 2005
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot check the mysql service status directly from the particular web site. However, you can check it by login to your server. If you do not have an access to your server where your domain is actually hosted then you will need to contact your server administrator.

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by thewebhostingdir View Post
    You cannot check the mysql service status directly from the particular web site. However, you can check it by login to your server. If you do not have an access to your server where your domain is actually hosted then you will need to contact your server administrator.

    Ok, got it!

    Thanks for your reply
    I need help

  4. #4
    SitePoint Evangelist Tapan's Avatar
    Join Date
    May 2005
    Location
    India
    Posts
    557
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cathie View Post
    May I know is there any way to check mysql service status for my website?

    eg for php, we can use phpinfo()...
    Hi,

    You can use this little script on your server/hosting:

    PHP Code:
    <?php
    $db_host 
    "localhost";
    $db_username "root";
    $db_password "";

    $conn = @mysql_connect($db_host$db_username$db_password);

    if (!
    $conn)
    {
            die (
    "MySQL is Down due to: " mysql_error());
    }

    echo 
    "Connected to MySQL!";
    mysql_close($conn);
    ?>
    Thanks.

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by Tapan View Post
    Hi,

    You can use this little script on your server/hosting:

    PHP Code:
    <?php
    $db_host 
    "localhost";
    $db_username "root";
    $db_password "";

    $conn = @mysql_connect($db_host$db_username$db_password);

    if (!
    $conn)
    {
            die (
    "MySQL is Down due to: " mysql_error());
    }

    echo 
    "Connected to MySQL!";
    mysql_close($conn);
    ?>
    Thanks.

    Thanks for your sharing Tapan...

    At least I can know what's the problem with the connection this time
    I need help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •