Welcome to WebmasterWorld Guest from 54.144.107.83

Forum Moderators: open

Message Too Old, No Replies

Useful tools for SQL database management

Lets us share

     
7:46 am on Jan 19, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 22, 2004
posts:1082
votes: 0


Hi

Please share what tools you use for managing your online databases of websites.

I have been fan of phpmyadmin and putty combination for compelte management of databases

here is quick tip for backing up using putty

Connect to your host via SSH
Run: mysqldump --opt -u user -p dbname > [PATH]/backup.sql

Just enter the details and hooooo database backed up in just some minutes .

Its great time saver

Please do share names of tools and softwares which you use for managing your databases

Have a nice day

4:05 pm on Jan 19, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


You missed a couple parameters there, particularly the password. When run from a script you can do:

$db_host = mysql.yoursite.com or "localhost"
$sql_admin_login = mysql user login name, for public-access applications this user should be a read-only user, but in the context of doing a backup, this should only be done from an admin script anyway. In this case this will be a write user for admin functions only.
$sql_pass = password for this user
$db_name = your database name
$rt = /full/path/to/domain/root
$bu = directory to store backup file, it must have write permissions by the script
$file = yourbackup.sql, I like to create a file name with the date on the fly: domainname + 2008-01-19 + .sql

mysqldump -h $db_host --user=$sql_admin_login --password=$sql_pass $db_name > $rt/$bu/$file

Mysql is so easy to script I build it into my own applications. I've used phpMyAdmin and a couple others, but am not comfortable not knowing **exactly** what the scripts are doing. :-)

Additional help, restoring from a backup: from the mysql prompt, type source /path/to/backup_file.sql

2:43 pm on Jan 31, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 9, 2006
posts:75
votes: 0


The mysql admin and mysql query browser from mysql themselves are very good for development (as good as teh oracle tools if not better) a live box wont have the ports open normaly.

[mysql.com...]
[mysql.com...]

Vital tools for your dev and test boxes I normaly write my sql queries in query browser first only then do a write the php code.

9:08 am on Feb 1, 2008 (gmt 0)

New User

5+ Year Member

joined:Feb 27, 2006
posts: 6
votes: 0


I've never used Putty. I just go to PHPAdmin and click on dump and save in an SQL file. If it's large I zip it. What do I need putty for?
9:46 am on Feb 1, 2008 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


putty gives you terminal access to the server so you can enter commands, such as mysqldump, mysqladmin, mysql.
you can also use the mysql client on the server to enter various sql commands.

plus just about any other system, server, file or data administration or management function you might have...

6:52 pm on Feb 1, 2008 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


I'm a command line guy too but I recently started using the Eclipse IDE Data Tools Platform (DTP) for certain tasks and I actually like some of the features.
4:30 pm on Feb 5, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Mar 9, 2006
posts:75
votes: 0


>>re "I've never used Putty. I just go to PHPAdmin and click on dump >>and save in an SQL file. If it's large I zip it. What do I need >>putty for? "

if the file is over the php upload limit you will need cli access