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)
-   -   getting a SQL database with only FTP access ***Challenge*** (https://gfy.com/showthread.php?t=658094)

OG LennyT 09-21-2006 08:20 PM

getting a SQL database with only FTP access ***Challenge***
 
I'm with a shitty company on a dedicated server and I have all the files backed up no prob.

Problem is, I need the SQL database so I can switch to a new host asap!

I have NO control panel access as their softwares been down for a few weeks.

How can I get the SQL with only FTP to the server?

Spudstr 09-21-2006 08:22 PM

get a script like phpmyadmin www.phpmyadmin.net set it up, export your database easiest way to do things without problems.

squishypimp 09-21-2006 08:23 PM

what shitty company are you with for your dedicated?

GrouchyAdmin 09-21-2006 08:28 PM

Make a PHP script and execute that on the webserver. That's how I finally got my data out of WebAir's shitty shared system.

Code:

<?php
$cmd = 'mysqldump -u=myuser -p=mypass dbname > dump.sql';

$n = (function_exists(passthru)) ?  passthru("$cmd") : exec("$cmd");
return $n;
?>


OG LennyT 09-21-2006 08:30 PM

Thanks guys, I appreciate the efforts....gonna try the phpmyadmin first

Sami 09-21-2006 08:44 PM

Yeap.
You can upload phpmyadmin, create a sql dump ... it will allow you to download the .sql dump.

Then upload that to your new server and import it to your mysql database on the new server and you are set :)

fetishblog 09-21-2006 08:49 PM

Holy shit, you have a dedicated server with no phpmyadmin installed? No SSH access? Dude, you need to move to a new host, NOW! :)

rvn 09-21-2006 09:31 PM

Use Sypex Dumper. It is a little open source PHP script to back up and restore MySQL databases of any size and content (including BLOB fields etc). Extremely easy to use - backup and restore in few clicks. Must have!

bugrov.net/dumper/

There you can find English version of the script (originally it had only Russian version).

kacy 09-21-2006 10:12 PM

Sorry to hear your troubles, that sucks :(
Same recommendation here, phpmyadmin.

fatdicksimon 09-21-2006 10:24 PM

if you have root access, you can navigate to the mysql data directory and copy the actual data files. the data directory depends on your linux distribution and mysql config, but it is usually /var/lib/mysql.

when you navigate to that directory, and look at the directory listing, you will notice that all of the directories have the same names as your mysql databases. within these directories there are .frm, .MYD, and .MYI files. these are the actual mysql data files, and these three files together actually make up the content of each mysql table.

download the complete folders for all of the databases that you are trying to restore on the new server.

now, on your new server, manually create the databases from the command line or browser interface. next, navigate to the mysql data directory (like i said it will probably be /var/lib/mysql/) and you'll notice that folders have been created with the database names. upload the .frm, .MYI, and .MYD files for each respective database. now the important part: make sure that these files are owned by the mysql user or else they won't be read. you can do this by issuing the following command within the directory:

chown mysql:mysql *

after you do that you should be set with your databases completely restored.

hope that helps. i had to do it a while ago and it was relatively painless.

adultguus 09-21-2006 11:03 PM

[QUOTE=fatdicksimon]if you have root access, you can navigate to the mysql data directory and copy the actual data files...QUOTE]
I hope that root access is disabled over FTP, because if not, these guys really don't have a clue about what they're doing.

At my servers I don't even have direct root access over SSH.

woj 09-21-2006 11:06 PM

most straight forward way is to just setup phpmyadmin, takes whole 3 mins...

martinsc 09-21-2006 11:08 PM

hwo did it go dvd316??


All times are GMT -7. The time now is 07:49 PM.

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