Uploading MySQL database to server? -


i have created website has mysql database. i'm using phpmyadmin , xampp. have website upload files (using filezilla). how upload mysql database server , connect website? i'm guessing there tutorial somewhere couldn't find it.

if have database file ready upload in phpmyadmin there import option shown in image below:

enter image description here

in order connect website depend on server side language choice...

example php connect website database (using pdo):

<?php  $dsn = 'mysql:dbname=name_here;host=127.0.0.1'; $user = 'root'; //change username $password = '******'; //change password  try {   $pdo = new pdo($dsn, $user, $password);  } catch (pdoexception $e) {   echo 'connection failed: ' . $e->getmessage();   exit; } $pdo->setattribute(pdo::attr_errmode, pdo::errmode_exception);   ?> 

once have @ top of php file can connect. 1 way via php.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -