|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: May 2001
Posts: 5,335
|
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
__________________
ReliableServers.com - NO REF LINK! |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: May 2002
Location: Dayton, OH, USA
Posts: 1,863
|
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.
__________________
JamPlay.com - Online, video-based guitar lessons |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
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.
|
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
Oops - that'll teach me. Totally missed the NT box thing. Still, it may have an NT version.
|
|
|
|
|
|
#5 |
|
Confirmed User
Industry Role:
Join Date: Feb 2002
Location: California
Posts: 7,444
|
|
|
|
|
|
|
#6 |
|
Registered User
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
|
mysqldump [db_name] > some_file
move 'some_file' to new server myqladmin create [db_name] mysql [db_name] < some_file pretty simple.. |
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: May 2002
Location: CT
Posts: 5,246
|
just use mysqldump it comes with windows install and is located under the bin directory in your mysql instillation
|
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Jun 2002
Location: Cyberspace
Posts: 594
|
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! |
|
|
|
|
|
#9 |
|
Confirmed User
Industry Role:
Join Date: May 2002
Location: oregon.
Posts: 2,243
|
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.
__________________
php/mysql guru. hosting, coding, all that jazz. |
|
|
|