Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




How To Store Secure Password


I want to store password in encrypted format(Non visible i.e *** ) in mysql tables?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Trying To Store A Password In Mysql Table
Not certain if thats the right way...i changed the function to PASSWORD and it encrypted it, but when i'm trying to match the password with the encrypted one, it doesn't work.

i've been looking online and see that the password function in mysql may not do what i need. i'm looking for extra security, that's why i wanted it.

How To Store The Password In The ENCRYPT Form Using Castor Jdo
Currently i have a FORM_BASED Authentication of tomcat5.0 to
store and retrieve passwords in my homepage.Now when i try to Store my
password in a encrypted form i am having some problems,i am listing
the problems here.do help me to fix this.

when a new user signup to my homepage his datas are to be stored in
database.while storing this i need to store the password in encrypted
manner,when i insert it manually in comman line it works well,but when
used with jdo or sql query thru our product it doesn't work.how can i
store it?

But anyhow i found a way to retrieve the encrypted password in
database and checked for authentication and it works well.

SO PLS HELP --ON HOW TO STORE THE PASSWORD IN ENCRYPTED FORM IN
DATABASE(MySql)

NOTE :i am using cator jdo 0.9.3.21 and tomcat5.0 for database
processing

Non Networked = Non Secure
mySQL looks good for a Network. BUT as a standalone it is not secure.Open anytable.MYD in a hex editor and you can see the data.So we can't sell our software to clients on wind98.

Believe it or not we have had a lot of success selling software with a proprietary database where the data is in 'unusual' format.
Clients are happy because casual snoopers can't see personal data,and we dont promise "strong" security.

Security through obscurity works!I wish mySQL had even a touch of obscurity in its MYD files.

Replication Secure
I'm about to jump into the world of mysql replication, but am wondering if the connection between database servers is secure seeing as how they will have to communicate across the internet.

Transaction Secure Code
When executing a specific query, I need to lock the db to ensure that no data is altered while the query executes.

My question is: Do I need to take a ROLLBACK on the db to release the lock, or is it enought just to set autocommit=1 again?

Simplified example of how I do it now:
SET AUTOCOMMIT=0
BEGIN
SELECT .......bla bla bla <execute some php code based on the result>
ROLLBACK
SET AUTOCOMMIT=1

Example of how I want it to be:
SET AUTOCOMMIT=0
BEGIN
SELECT .......bla bla bla <execute some php code based on the result>
SET AUTOCOMMIT=1

Are there any downsides by not using ROLLBACK in the second example? The database has not been altered in any way.

How To Secure My Mysql Database From Others?
1) if somebody else knows my mysql database username and password ( username with all permissions ) can they copy my database even if they do not know my control panel password?

2) Suppose I have placed my database username and password in a .php file in my file manager not in the admin folder, is there any possibility for others to steal my username and password?

3) what steps should I take to secure my mysql database from hacking and all such unwanted dangers.

Designing A Secure Database?
I'm working on a website/database deal, and right now I'm designing the
security model.

It's using LAMP(HP), so all the tricks are going to be through PHP.

First off, this will be behind a firewall with SSL encryption. We may also
setup some kind of VPN tunneling.I'll be ignoring other security details
that don't apply to the problem at hand, but please feel free to suggest.

I'm going to have users enter a username and password, with PHP emulating
the htaccess dialogue boxes. I would like to check the entered values in a
permissions table. This table looks like:

username | passwordhash | ipaddress | permission

All users will have a static IP, so they have to match the
username-password-ipaddress combination. I'm storing the passwords as an MD5
hash in case someone breaks in and reads the table.

So what MySQL user does PHP log onto as the database as, in order to read
the permissions table? (After that, we just go with the logged user's
permission). If I make a special user that just has permission to read the
permission table, do I have to store that user's password plaintext in a php
script somewhere, thus adding a security risk if someone were to get a hold
of that password?

Making Secure Database
how would i go about making my database as secure as possible so users information is kept as safe as possible....

at moment i am using md5 encryption for their passwords... does any1 recommend anything else ?? and also in general to keep my data as safe as possible..... will web hosts deal with keeping mysql database secure or should i do sumting against it?

C API Secure Client Connections
Any idea where can I get a copy of the libmysql dll with ssl enabled?

Secure Backup On Win32 Systems?
mostly for unix platforms.

On win32, what is the best way to run a secure mysqldump so that my
password doesn't have to live in a script somewhere?

I'm using perl scripts to kick off my backup commands.

How Do I Enable Query Logging? Is It Secure?
How do I enable query logging? I am using version 4.1.22-standard

From Test Environment To Secure Commercial Use.
I'm relatively new in the database administration field. Uptil now I've only tried MySQL together with PHP in a test environment. I would appreciate if someone could answer a couple of question, I have regarding commercial use and a secure professional configuration.

Uptil now I've used XAMPP as my installation on my own computer on localhost. Now we'll install the same software package on a server. I guess XAMPP and PHPmyAdmin is not a professional setup right?

Questions:
1. What is the best recommended and professional setup for commercial use?
2. What is the best GUI for the database?
3. What is Frontend and Backend?
4. Backup setup? Just if anyone have some recomendation.

I've built a web based dynamic Content Management System in PHP and MySQL for internal use. Using the localhost as the developer platform. I've never before built something like this for commercial use.

5. How do best implement this system on our companys server, so we all can use the system?

Secure Backup On Win32 Systems?
i know items have been posted before, mostly for unix platforms.

On win32, what is the best way to run a secure mysqldump so that my
password doesn't have to live in a script somewhere?

I'm using perl scripts to kick off my backup commands.

Mysql Connection - Plain Text Or Secure
Are mysql connections over the internet plain text or are they encrypted.
If not encrypted is there a way to encrypt them?

Random Password Vs. User Created Password For Site Login
Are there any security issues or other concerns that make one preferable? The client is pushing for user created passwords.

I'm mapping out the basic functionality and front-end for a MySQL/PHP back-end that will be completed by a third party. I'm a novice to MySQL but familiar with PHP and their interaction. Mainly looking for anything to support one method over the other.

Mysql Password() & Unix Crypt Password...
I am creating a user administration system where system administrator
can activate services for a user, like webspace, a mail account or a
subdomain.

I now want to create a function that creates mysql databases and grant
the right privileges to a user. But the problem is that mysql wants to
have the plaintext password for the user in the "grant ... identified by
'pwd'" field, or in a manual query to update the password in the
mysql.user table with PASSWORD('pwd').

I have another database which holds the passwords for the users, these
password are stored the moment a user signs up and are used to activate
services, for example ssh access to the machine. The stored passwords
are encrypted using crypt(). So for adding a ssh service to a user, I
simply do echo "$user:$pwdhash" | chpasswd -e.

I have chosen crypt because some programs (like proftpd) don't take md5
sums.

The problems is that I don't have the plaintext password. So I cannot
add a mysql db.

So I need to create a user in mysql with a crypt password.
I tried to just "grant all privileges ... identified by 'nothing'"
and then afterwards update the mysql.user table and putt the crypt
password in there but it doesn't work like that.

Does anyone have any idea on how I could fix this, how can I create a
user in mysql without having his plaintext password and only having a
crypt hash of it.

I thought about not only storing a crypt hash, but also an md5 hash and
a mysql PASSWORD() hash.. but I think that's an ugly solution.

I Can Connect With Db Password Or Blank Password
I have a password setup for root (% and localhost) in Mysql 5.0.26, I can connect ok no problem. I can also connect with blank password! I know it is checking the password cuz it fails if it's wrong.

I'm sure I have only one account as well (tried to delete, recreate, etc... no change)
select * from user where user='root';
| localhost | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ...
| % | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ...

Is there an option to accept blank password!? I have this problem only for root user; Other accounts are fine.

I Changed Root Password But I Can Not Login With Changed Password
I changed the password of root with
update user set password=password('newpassword')

Then I exited. But when I want to login again , it cannot authenticate the root
I should tell you that a hacker had changed my root password before. Because it was not encrypted before.

Store PDF In DB?
I am writing a web application that is actually an application for a school, causes some word confusion...
Anyway, applicants need to be able to upload PDF statements and letters of recommendation and such. The applicant can re-upload the file multiple times with corrections, but only the most recent version will be kept. When the application is finished the PDF will be accessed a few dozen times by various reviewers.
For easy backup/maintenance/organization it would make my life much simpler to store the PDFs directly in the database, however I gather that there may be problems with this. The only stats I can find seem to worry about scaling with dynamic content being loaded for thousands of visitors, however I don't need to worry about that as only a few dozen folks will want to view any given file, over several weeks.
Aside from scaling is there any other reason to avoid storing the PDFs in a BLOB? Will the performance hit be that significant?

How To Store
An user fills a form. My script generates a reference, call it REF. There's also another value which is the same for each REF, call it REF2. The script also generates a date value, which should be stored for each form filled and may have different values for the same REF, call it DATE. Then there's three more values which are come from what's filled in the form, so values may vary for the same REF, call them VAR1, VAR2 and VAR3. When I search the database, I will look for REF.

To sum up, each REF2 is always the same for one given REF; and DATE, VAR1, VAR2 and VAR3 need to be findable when I have the REF value.
By the way, all of these are VARCHARs (but for DATE which is a, well, DATE).

The Best Way To Store Sub Categories
I am setting up a system where users can select a main department and then a sub-category of that department. I currently have a department table that holds the main departments.

=============
id | department |
=============

If I put the sub-categories in the same table I am not sure of how to relate them to the main department. Is the best solution to put the sub-categories into another table with a department id column to reference the main department.

==========================
id | sub-category | departmentID |
==========================

Best Way To Store This Data
I'm doing a bit of a site where users can upload replays of games. The table (called 'replays') will have fields like id, name, date_uploaded .... which take up about 10 feilds.

But there also has to be a way to store data on each player. There can be up to 8 players in a game and the database must somehow record:

a) the name for each player
b) a rating for each player
c) and a second rating for each player.

Any tips on how to do this? I cant imagine having a database with 40+ feilds called player1rating1, player1rating2, player2rating1

How Do You Know WHEN To Use STORE PROCEDURE
I need to execute sql and pass two application variables' values to sql, so that every row of record, with field commission, is summed with two additional app variable values.

Do I need stored procedure?

Best Way To Store PRICES In DB
Should I use INT, DECIMAL, CHAR? to store a prices in the database?

How To Store Jpg In MySQL?
How do I store pictures in mySQL? What is the data type for this field?

Store SQL Procedure
I need to log all sql statments that are performed on a database using PHP, and so i am playing on storing them in a mysql table. Is there a way that i can store a sql statement without it trying to execute?

Store A Number
How do i store a number into MySQL and then reacal it later for use and/or editing.

Store DB For Each Domain
if there is a way to set up MySQL server to keep DB's for one user in it's home folder?

I wonder how those virtual (shared) hosting companies set it up?

What I mean is say if I have two users (domains) on the server they will have all their files in their home folders.

/home/domain1.com/
/home/domain2.com/

I ask this because I find it neat to have all the files for one domain in one place - mostly for backup.

Format To Store IP
I need to keep a database of IPs and check if a new IP is there or not.
I was wondering what's the most efficient way to store an IP in a database to make searching most efficient. Would it be better to hash the IP or just keep it as it is or some other way perhaps?

Store A Select
For instance, I have;

@a:=(SELECT * from @n)


@n is the variable that has the name of the table inside.

Is this possible?

Store An Array
I'm using PHP to acces my MySQL database; Now, I would like to store an array in the database. I was very suprised to see that there is no array-type field (samen with boolean? why didnt they make a boolean field?!). Anyone an idea how I can save and recover my array from the db

Store Images
its better to store the image in the DB(mysql) or only store the direction where the image is uploaded... im using php to upload the image.

Store An Array
I would like to be able to store numerical array in MySQL. I am really
looking for the solution to store it in the one field only.
For example, I have a matrix, which I want to store in the table, but
I don't want to create one column per matrix element - too many
columns or matrix size could change easily.

Should I convert all elements from numerical type into string and
create one long string with element separators or it is better to
serialize the whole array and write it as a byte array? What other
options are available?I know Oracle allows to store the array directly in the DB. How MySQL approaches this problem?

Store Images
i'm just changing from openbase SQL to MySQL, so i'm new here.
in openbase i had images stored in a database. the 'type' was set to
'object'.
i can't find something like that here and also not in the manual.
what should i use

Store Quary
Hi, im all new to this database stuff and on Lynda.com course i heard that it is not possible to store quary in mysql database. Is this really true, is there no way around it? Why is it so? How can experienced developers put up with this

Store Data
Is there a way or code to store data, for example, photo files into MySQL after the users upload

Store Multiple Ids
I am trying to figure out the best way to organize some tables.

This is the problem
ID | Name | TransIDs
1 | Bleh | 2,3,5,6 ---- How should I do multple transids?

I searched in the forum and most people did this ,2,3,5,6, - which I actually did a couple weeks ago but I don't know if that is the best way to go about it.

To Store Procedure Or Not
if I can get some input on where/when to used stored procedures. Should it be done as much as possible? Should it be done for queries that are run a lot? Etc?

We are working on application and I want to use them but I don't know which queries make sense to use in them - too many or too little, the wrong ones or the right ones, etc.

Store Friendships
How do i store friendships in MySQL for a social web app?

Store Currency
is double(6,2) probably the best way to go about it? (6 is just a guess, you could go higher I suppose)
what's the best way to re-add zero padding when you retrieve it? ie, 52.70 will become 52.7

Store Paths
I have to store the paths to several thousand files. There are probably about 70 or 80 directories involved and they are hierarchal.
Is it best to
A. have a path table with a path_id and an absolute path
or
B. have a path table with a path_id, directory name, parent_directory_id.
I started with B but now I'm thinking A would be easier.

What's Wrong With This Store Function?
first attempt at it:

DELIMITER $$

DROP FUNCTION IF EXISTS `db2`.`difference`$$

CREATE FUNCTION `db2`.`difference` (n1 varchar(10), n2 varchar(10))
RETURNS int
BEGIN

declare a1 int;
declare a2 int;
declare a3 int;
declare a4 int;
set a1=substring(n1,2,3);
set a2=substring(n2,2,3);
set a3=a1-a2;
set a4=sqrt(a3*a3);
return a4;

END$$

DELIMITER ;
error message:


Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'declare a2 int;
declare a3 int;
declare a4 int;
set a1=substring(n1,2,3);
set a2' at line 1
(0 ms taken)




Tbale Do Not Store More Than 127 Rows???
I have created and easuy table that only coout ( with an ajax input ) the number of tiems a specific pop up win is opened.
Up to here all ok.

My problem is that any time teh table reach row 127 as sumbre of items (cardinality) does not store any more datas.

The table is only 8K so is not absolutely oversized.

How Can I Store Items In A Database Like
Okay lets say I want to store a poem in the database like:

roses are red
voilets are blue
sugar is sweet
and so are you

And I want the spacing to be like that.. and when I call it with php it show like that with the spacing?

How To Store Calculated Fields?
I have a pretty big database, with a few fields that are actually the result of mathematical calculations based on other fields. (That are used in allot of searches.)
Example: a user's "score" in some game, where the "score" is the cumulative total of all that user's assets in the game.

Question is, what's the "best" way to hold/calculate this kind of stuff (fields that change when other fields are changed) when you have quite a few of these fields.

Note that these fields cannot be calculated on select, since I have 100k+ records, and the fields are pretty big/slow mathematical calculations.

I'm using php and mysql for this project, and looking for a easier way to deal with these type of fields instead of the way I'm doing it right now (at each update I get php to select/calculate/update all dependent fields to the updated field.)

Not 100% sure if this should be here or in the php forum, so moderators, feel free to move it around.

Store Results To A File
I am brand new to mysql and have a very basic question, but i can't find the answer in the manual. I am doing a query of a database:

select * from mydatabase

and I want to store the results in a file. Is there a command to do this?

Best Way To Store Team Data?
I'm working on a sports project, and I'm trying to figure out the best way to store the names of players on a team in a database. For example, I might have an entry for "Los Angeles Lakers" which needs to have information containing the players "Kobe Bryant", "Lamar Odom", "Derek Fisher", etc.

Currently I just have 3 columns: Unique Team ID (integer), Team Name (varchar), and Players (varchar).

I'll enter the Lakers as: "001", "Los Angeles Lakers", "Kobe Bryant, Lamar Odom, Derek Fisher"

and then if I need to get out individual players, I just "explode" the array in PHP along the commas for the Players field.

What Is The Best Way To Store XML File In MySQL?
I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is VARCHAR

How To Store An Image(gif, Jpg, Vsd(visio), Etc)
how to store images of various format; mainly both gif and vsd(visio). Is it possible? Do i have to use BLOB?


Copyright © 2005-08 www.BigResource.com, All rights reserved