Monitoring Kubernetes cluster using Prometheus and Grafana July 6, 2021.Example:ġ, If all of the input data(db_name, username, password, hostname) are right, then the output is like Database Connected successfullyĢ, If any of the entry in ‘mysql_connect’ secion is wrong, then the output is Could not connect the database : Username or password incorrectģ, If the database entry is wrong No database found If both of the arguments are true then you will get an output given after the echo command. Similarly, mysql_select_db check the database on the server. 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. It’s very simple concept, first the “ mysql_connect” argument will check the database hostname, username and password. Also the connectivity from this machine to DB machine should be enabled. If the DB is hosted on a remote server, change the host to that server’s hostname. To check the database connectivity, you must know the database hostname, normally it is “localhost” then database-name, username and password. It’s very easy and interesting to check your MySQL database connectivity from your account without login as a root user. This can be done from by adding a simple PHP script. Want to verify the DB connectivity from the web browser?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |