Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // If using Docker, this code has been tested with "jorge07/alpine-php:7" image.
- $link = mysqli_connect("107.170.222.199", "donstringham", "1234pass", "final");
- if (!$link) {
- echo "Error: Unable to connect to MySQL." . PHP_EOL;
- echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
- echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
- exit;
- }
- echo "Success: A proper connection to MySQL was made! The database is great." . PHP_EOL;
- echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;
- mysqli_close($link);
Add Comment
Please, Sign In to add comment