Connect with MySQL database externally from wordpress site
- Status: Closed
- Prize: $20
- Entries Received: 3
- Winner: Mahediii
Contest Brief
EC2 Instance A (Amazon Linux) has MySQL database on MariaDB server.
EC2 Instance B (WordPress) has website pages. Add Code Snippets in WordPress website page to connect with MySQL database running on Linux instance A. Describe a brief process using general terms. Below is the example of snippet code, the info are not correct, its just for ilustration. Add points if any setting or security need to be updated on Linux instance.
<?php
$servername = "ec2-4-147-150-57.us-east-2.compute.amazonaws.com";
$username = "username";
$password = 'password@123';
$dbname = "database";
$dbport = '3306';
$connect = mysqli_connect($servername, $username, $password, $dbname, $dbport) or die(mysqli_error($connect));
if ($connect)
echo "successfully connected!";
?>
Recommended Skills
Top entries from this contest
-
Mahediii Bangladesh
-
aklimakhatun3953 Bangladesh
Public Clarification Board
How to get started with contests
-
Post Your Contest Quick and easy
-
Get Tons of Entries From around the world
-
Award the best entry Download the files - Easy!