Click to See Complete Forum and Search --> : mysql dump


muhammad shahid
06-09-2008, 05:18 AM
Sir,
i backup my database, with query
# mysqldump -u root -ppassword sscript > sscript.sql

and message showed that,
Your SQL query has been executed successfully

but where this file is stored.

and i have to configure it for godaddy, is it right way,

waiting.

shahid

muhammad shahid
06-09-2008, 05:33 AM
i exported database , and configured with godaddy, when i finished configuration godaddy showed me this code,

This example describes using PHP to connect to a MySQL Database on a Linux hosting account.
<?php
//Connect To Database
$hostname='h50mysql67.secureserver.net';
$username='cellcam';
$password='your password';
$dbname='cellcam';
$usertable='your_tablename';
$yourfield = 'your_field';

mysql_connect($hostname,$username, $password) OR DIE ('Unable to connect to database! Please try again later.');
mysql_select_db($dbname);

$query = 'SELECT * FROM $usertable';
$result = mysql_query($query);
if($result) {
while($row = mysql_fetch_array($result)){
$name = $row['$yourfield'];
echo 'Name: '.$name;
}
}
?>

What i do with this code.

chazzy
06-10-2008, 08:21 AM
what exactly are you trying to do? looks like 2 different posts completely. when you use mysqldump, it'll create the .sql file in whatever directory you're working in.