Click here to get back home

MySQL Encryption

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
MySQL Encryption Alan M Dunsmuir 07-05-2008
Posted by Jerry Stuckle on July 5, 2008, 10:03 am
Please log in for more thread options
Alan M Dunsmuir wrote:
> Jerry Stuckle wrote:
>>
>> Try comp.databases.mysql for your mysql questions. This is a PHP
>> newsgroup.
>>
>
> No. It is actually a question about phpMyAdmin.
>

Sorry - tried to go back to edit and hit send instead...

If you're asking about phpMyAdmin, you should be asking the phpMyAdmin
support people. This is not a product support forum for anything which
just happens to be written in PHP.

I recommended comp.databases.mysql because export is a MySQL operation,
and you might be able to get some help there.

But this is not the correct forum to be asking your question.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Posted by Betikci Boris on July 6, 2008, 6:56 am
Please log in for more thread options
> I'm writing a Web application using PHP5 connecting to a MySQL database.
>
> I've told the client's application administrator to look after back-ups
> of the database by using the "Export" option in phpMyAdmin to
> automatically copy the database contents (recorded as SQL statements) to
> his desktop.
>
> Is there some way I can include encryption in this download process?
> (And equivalently, decryption should he need to restore the database
> from a backed up copy?) He is running a Windows machine, so for him to
> do this locally, as a separate step, would require the use of some
> Windows encryption code, and would risk his leaving a open text version
> of the database on his desktop for anybody to see.

You can use PHP, with it's mcrypt-crypto functions, see http://www.php.net
for details...There are a lot of open-source solutions for simple file
encryption ;)

OR

You can pay for other encryption-decryption software.

Posted by Betikci Boris on July 6, 2008, 7:03 am
Please log in for more thread options
> I'm writing a Web application using PHP5 connecting to a MySQL database.
>
> I've told the client's application administrator to look after back-ups
> of the database by using the "Export" option in phpMyAdmin to
> automatically copy the database contents (recorded as SQL statements) to
> his desktop.
>
> Is there some way I can include encryption in this download process?
> (And equivalently, decryption should he need to restore the database
> from a backed up copy?) He is running a Windows machine, so for him to
> do this locally, as a separate step, would require the use of some
> Windows encryption code, and would risk his leaving a open text version
> of the database on his desktop for anybody to see.

Here is my simple mcrypt training script works on Linux PHP-5.2.6-26
a konsole program by the way.. You need libmcrypt-2.5.8 and PHP-5.2.6
compiled with mcrypt support.

<?php
// Boris The Scripter =) 2008 Licence:GPL-2
// usage: php fubar.php <key> [-e/-d] <filename>

if($argc <= 4 && is_file($argv[3]))
{
$input_file_addr = $argv[3];
$input = file_get_contents($input_file_addr);
$key = $argv[1];
if($argv[2] == "-e")
{
        $encrypted_data = @mcrypt_ecb(MCRYPT_RIJNDAEL_256, $key, $input,
MCRYPT_ENCRYPT);
         //echo $encrypted_data . "\n";
$fp = fopen($input_file_addr,"w");
fwrite($fp,$encrypted_data);
fclose($fp);
}
else if($argv[2] == "-d")
{
        $encrypted_data = @mcrypt_ecb(MCRYPT_RIJNDAEL_256, $key, $input,
MCRYPT_DECRYPT);
         //echo $encrypted_data . "\n";
$fp = fopen($input_file_addr,"w");
fwrite($fp,$encrypted_data);
fclose($fp);
}
}
else echo "Program made a boo boo!\n";

?>

Similar ThreadsPosted
mysql encryption tutorial? July 16, 2006, 10:19 pm
what's the Basic Encryption method used in mysql February 17, 2007, 12:00 am
encryption October 7, 2005, 8:37 pm
Using encryption November 12, 2008, 1:00 pm
Binary Encryption November 3, 2004, 5:53 pm
Slightly OT: encryption March 11, 2005, 11:18 am
Asymmetric Encryption in PHP? March 23, 2005, 10:06 pm
PHP on Windows with Encryption April 18, 2005, 7:59 pm
Best encryption technique April 19, 2005, 12:11 pm
file encryption using PHP June 14, 2005, 8:04 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap