Results 1 to 2 of 2

Thread: Mysql db backup

  1. #1
    Join Date
    Feb 2005

    Mysql db backup


    I want to output username, password and email from database.
    I can't output this on my screen or in a table as its pretty much, its about 75k users. I have also tried to fwrite the results into a txt but it also timed out here.

    I have also whent into phpmyadmin and chose 'export' and choose download as file, zip, and try to download.. but this also times out.. takes so long time. I dont have access to php.ini on my server.

    I just need to have output all of the usernames, passwords and emails in a file. And its pretty much. Can I for example do this with PHP? Any ideas on this?

    Thanks in advance for all replies,

  2. #2
    $db_name ="YourDB";
    $table_name ="YourTB";
    $connection = @mysql_connect("hostname","dbusername","dbpassword") or die(mysql_erro
    $db = @mysql_select_db($db_name,$connection) or die(mysql_error());
    echo "
    <b>Cut and paste the text below</b><br>
    $SQL = @mysql_query("SELECT * FROM $table_name");
    echo "$username $password $email<br>";
    Think that should do what you want, just will have to change it to match your settings. I have a db with about 17K entries and it takes a few sec's to render the page pulling only 1 column from a single table. I'm still fairly new to PHP so maybe there is another way to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts