0

I recently began working with a company that wants me to work off of their SQL environment - they provided me with a SQL dump, in the form of a .sql file. Being a growing amateur developer, I haven't encountered something like this before. I was also given a PHP file for establishing the connection. I have no problem doing so through a Google Cloud Platform, however, I seem to have quite a bit of confusion doing so locally. Do I need a whole new server to dump this data to? Here is some of what I was given to use in the php file.

$ip = $_SERVER['REMOTE_ADDR'];
$user_agent = 'Not Available';
if(isset($_REQUEST['HTTP_USER_AGENT'])){
    $user_agent = $_REQUEST['HTTP_USER_AGENT'];
}

$dbHost = 'localhost';
$dbUser = '';
$dbPass = '';
$dbName = 'oomdo';

$response = array(
    'status'=>'NO',
    'content'=>'',
);

$m = new mysqli($dbHost,$dbUser,$dbPass,$dbName);

I realize this is a big question, but I have a willingness to learn, and any explanation would be much appreciated :)

codnor
  • 131
  • 1
  • 8

1 Answers1

0

You need to Import the SQL using PhpmyAdmin.

Create credentials in your Phpmyadmin interface so as to access the MySQL server from your PHP scripts above.

PhpMyadmin comes with WAMP(Windows Apache MySQL PHP), EasyPHP for Windows OS, LAMP(Linux Apache MySQL PHP) for Linux Distros, MAMP for Mac.

You can install this on your system by searching for it on https://sourceforge.net