Link Details

Link 1142659 thumbnail
User 1214323 avatar

By veeblealb
via crybit.com
Published: Apr 19 2014 / 16:43

Hey! It’s very easy and interesting to check your MySQL database connectivity from your account without login as a root user. Here is a script to do the same. To check the database connectivity, you must know the database hostname, normally it is “localhost” then database-name, username and password. PHP Code: It’s very simple concept, first the “mysql_connect” argument will check the database hostname, username and password. If the first argument is true, then PHP take the second line to execute else the script will die with an output given in the Die section. Similarly, mysql_select_db check the database on the server. If both of the arguments are true then you will get an output given after the echo command.
  • 8
  • 0
  • 283
  • 1351

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java