UGN Security
Posted By: Cyrez My Sql Help - 07/23/02 07:19 PM
I wannna backup my my sql db's via the command line since i cant do it via my cpanel. so how do i do this..
Posted By: Predator Re: My Sql Help - 07/23/02 08:15 PM
for backing up:
mysqldump $databasename -u $user -p$password > /home/$user/file.dump, that should do it

to put it back on it's place:
mysql $databasename -u $user -p$password < /home/$user/file.dump

that should do it
Posted By: Le4rner Re: My Sql Help - 07/24/02 03:51 AM
Look into getting PHPMyAdmin

You can do a lot of that stuff in there also, A realy good progy. Most places that have Cpanel have it installed.
Posted By: Cyrez Re: My Sql Help - 07/27/02 04:07 AM
I typed the following...
bash-2.05$ mysqldump -u cyrez_cyrez -p cyrez_nuke -h n3tmask.com>backup.txt

Igot
Enter password:
mysqldump: Got error: 1130: Host '64.21.182.95' is not allowed to connect to this MySQL server when trying to connect

but it still makes a backup.txt file is it valid. .or is it junk..
Posted By: Le4rner Re: My Sql Help - 07/29/02 08:07 PM
Should look something like this

Code
 
# phpMyAdmin MySQL-Dump
# version 2.2.2
# http://phpwizard.net/phpMyAdmin/
# http://phpmyadmin.sourceforge.net/ (download page)
#
# Host: localhost
# Generation Time: Jul 29, 2002 at 04:00 PM
# Server version: 3.23.45
# PHP Version: 4.1.2
# Database : `your_database_name`
# --------------------------------------------------------

#
# Table structure for table `Table_name`
#
CREATE TABLE Table_name(
  feild_name varchar(255) default NULL,
  feild2_name int(11) NOT NULL auto_increment,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

#
# Dumping data for table `Table_name`
#
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered'', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
INSERT INTO Table_name VALUES ('feild_you_entered', 'feild_you_entered');
# --------------------------------------------------------
 
The process continues for each table within that database. That is of course if you backed up the whole data base. I am telling you PHPmyAdmin makes it a LOT easier.
Posted By: Predator Re: My Sql Help - 07/29/02 09:26 PM
Quote:
Originally posted by Cyrez:
I typed the following...
bash-2.05$ mysqldump -u cyrez_cyrez -p cyrez_nuke -h n3tmask.com>backup.txt
I hope you're joking :rolleyes:
Posted By: Cyrez Re: My Sql Help - 07/30/02 01:58 AM
of coarse
Posted By: Le4rner Re: My Sql Help - 07/30/02 02:43 AM
YOur cpanel has PHPMyadmin... Trust me.

Get into there and look around right after you open up your data base. It will be in the main frame. just below the list of tables in the data base.

The will be a check box that say

Save as
Posted By: Cyrez Re: My Sql Help - 07/30/02 05:05 AM
i know it has phpmyadmin i know about that stuff. but the cpanel dosnt work cuz my webhost is stupid and im leavin them and they dont know what there doin..
© UGN Security Forum