GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Help Needed: MySql Question (https://gfy.com/showthread.php?t=68023)

Keev 07-15-2002 02:07 PM

Help Needed: MySql Question
 
Here is the situation....

I am getting ready to revamp dnclassifieds.com completely and I need to extract the mysql database and its info so i can get some info out of it and have it configured to work with the new system that is being built....


How would i extract it and be able to get info out of it?


This is on a NT Box and its running in coldfusion..


Keev
104463163

Ace-Ace 07-15-2002 02:10 PM

NT Box, hmmm...I know for unix (redhat actually), this'll do it:

mysql -p(passwordhere no space after the -p) (database name to extract to) < /absolute/path/to/*.sql

Obviously, don't use the parenthesis.

Tipsy 07-15-2002 02:20 PM

Installing phpmyadmin on the new (or both) machines can make life a LOT easier if you're not too hot on MySQL and need to move stuff.

Tipsy 07-15-2002 02:21 PM

Oops - that'll teach me. Totally missed the NT box thing. Still, it may have an NT version.

SetTheWorldonFire 07-15-2002 02:40 PM

http://www.mysqlstudio.com/

Big E 07-15-2002 09:51 PM

mysqldump [db_name] > some_file

move 'some_file' to new server

myqladmin create [db_name]
mysql [db_name] < some_file

pretty simple..

foe 07-15-2002 09:54 PM

just use mysqldump it comes with windows install and is located under the bin directory in your mysql instillation

wsjb78 07-16-2002 02:20 AM

if you can run PHP and I'm pretty sure you can install phpMyAdmin.... once setup, just select the database you want, select all tables in the database and select table structure and data and you can download it to your comp as a .sql file.

that's the easiest way....


Backing up mySQL from the command line:

Log into telnet. Then move to the directory where you want the backup to be. then type:

mysqldump -u mysqlusername -p mysqldatabase > dumpfile.sql;

(Note: the ";" at the end is important to have it recognised as a mysql command)

Then you'll be asked for your mysql password. Just enter it without any ";" at the end.

Then ftp in and go to the dir. Download the .sql file and there you go.

Restoring the data to the database (same or different) is easy. Just log in into telnet again, change to the appropriate directory where you have your .sql stored and enter following:

mysqldump -u mysqlusername -p mysqldatabase < dumpfile.sql;

Then you'll be asked again for your password.


I don't really know if this works on your box....

Contact me if you have problems!

mike503 07-16-2002 09:20 AM

you don't run mysqldump the second time to import it, you run mysqlimport or you can simply do

mysql -uUSER -pPASS -A < file.sql

assuming the file.sql has the create database foo; use foo; lines.


All times are GMT -7. The time now is 10:08 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123