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




Mysql User Table For Authentication


What is the best way to store usernames/password information within a mysql Table? Is there a way to encrypt the columns that house this data?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
User Authentication
I do know how to create user logins and such.what I need to know is once a user logs in and submits his data (CSV) to Mysql DB,how do i ensure that the data goes into his account.In other words,whats the best way to manage user accounts and control the data that goes into that.

Best Approach To User Authentication?
So I'm setting up a php/mysql driven website on our company's intranet. I need to setup username's and passwords for different individuals because they all need access to different parts of the site.

Now I'm reading up on how to do user authentication. One way I am reading about, involves creating a username/password table in the database, and when the user attempts to login in some generic php/html form, the php logs into the database using a generic login/password, then checks to see if the user's login/password match up with what is in the table.

That's an interesting way to do it. But the thing that is odd to me is that you actually log into the database using a generic login/password (hidden in the php script) and you would simply have to control what the user has access to in your frontend code, based off their login.

MySQL has it's own user authentication system in place, where you create logins and passwords for the database and control what databases and tables they have access to and control what they can do with them. So why wouldn't you do it this way?

Sorry if this sounds confusing, but hopefully users experienced in this understand where I am coming from.

Fields In Users Db Table For Authentication
which fields do you place in your db for user authenication?

for example..:
CREATE TABLE `users` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`Username` VARCHAR(40) NOT NULL default '',
`Password` VARCHAR(40) NOT NULL default '',
`Lastlogin` datetime default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

i wonder for some more useful fields for software logging/management people sometimes (or seldom :-)) use like:
lastip
createdon
lastlogin
active ('yes', 'no', 'banned') -

Mysql User Table?
I have number of customer and they should have different access levels, some would access only few pages. I thought if i create a table:users in my database: maindata-> table: loginuser: will solve the problem, but something is not right when i saw the default mysql user table.

maindata->table loginuser: columns are
user id autoincrement
userfname varchar
userlname varchar
email varchar
userurl varchar
accessgroup (tinyint) = 1,2,3,4
Depending on this value they will access the specific url with.

However after reading code below, I am bit confused about storing all users, should i use default mysql user table cause it has got all privaleges by default ie., insert, del, modify etc. and sounds more secured cause if by mistake users can type admin.php url? I am new to all this and sort of confused.

PHP Code: ....

Authentication To MySQL
i have one problem with l'authentication to the MySQL;
I am using the language Java and i access to the data-base in following

db = DriverManager.getConnection("jdbc:mysql://localhost:3306/" +
nomeDB + "?user=" + nomeUtente + "&password=" + pwdUtente);

but I do not want insert pwdUtente and nomeUtente in the source-code,
What can i do?

MySQL And PHP Authentication
I'm getting the following error while trying to connect via php to an existant mysql (local) server:

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client.
I have latest PHP and MySQL installed.

This seems like the password problem (new password system now) the older was 16 bits right? Thing is... My PHP should support this, its 5.x and I have latest mysql as well.

MySql / Php Authentication Problems
whenever I try to access mySql, I alway's get the following error:

#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

A little extra info (if needed):
-I just installed php v 4.3.1, apache 2, and mySQL 4.1
-It's all on my laptop (if it makes a diffrence)
-It's on a windows platform

Relating User Table With Content Table
I have a mysql table with the curriculum vitae (CV) information of about 50 researchers. I would like each researcher to be able to edit and update his/her information. In order to do this I need to create a membership system for the researchers to access their respective CV page.

Before I do anything I want to plan this out, hopefully with a little help of more experienced developers and programmers. So I am open to any ideas.

This is the thing that stumps me the most right now:

Right now I have a CV table (with all the curriuculum vitae information) and need to create a users table that will somehow link with the CV table. Eventually, what I would like is with a login and password (that they choose) they will automatically open their CV page. These are the questions I have:

What fields in the user table should I use to link the user table with the CV table?
Once that is established, how, by providing their login and password can I direct them to their own page to update? Should one of the fields in one of the tables contain the (already existing) address of their CV page?

Deleted Root User From Mysql.user !!!
While trying to grant access to root user, i deleted all entries for root from mysql.user.

I've tried to use root% (anonimous built-in administrator user) but to no good).

Is there another admin user i could use to run mysql monitor and insert root records to mysql.user? I've read

Could I use a copy of the mysql.user table?

I'm using version 5.0.16-standard on Linux Fedora Core 3.

Before ruinin the root user, i made a backup of a databasefrom the same server (not mysql database); i was wondering if that backup contains the mysql.user information somehow?

Client Does Not Support Authentication Protocol Requested By Server; Consider Upgrading MySQL Client In
I have recently upgraded to MySQL 5. Got this error message in my IE Browser. Have read some of the comments on other forums and my choices are: Upgrade all client programs to use a 4.1.1 or newer client library, or

SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd')

Can someone please advise?

Mysql_connect(): Client Does Not Support Authentication Protocol Requested By Server; Consider Upgrading MySQL Client
Basically I am setting up php,mysql and apache to run an application. While trying to connect I get the following error:

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:sudhirapachehtdocssvgmap est4.php on line 14
Cannot connect to the database.
Client does not support authentication protocol requested by server; consider upgrading MySQL client
I have tried the following message posted earlier by many of you guys i.e
"SET PASSWORD FOR peter@localhost = OLD_PASSWORD('something')
flush privileges

I am trying this from a long time and do not find a way to fix this problem
I request you guys to help me in soughting this out and I appreciate your patience in reading my post.

Mysql_connect(): Client Does Not Support Authentication Protocol Requested By Server; Consider Upgrading MySQL Client
I am having an awkward problem with my MySQL installation. I have a number of scripts that access the database from a few different web hosting sites. I have no problem accessing the database from the scripts that I host locally. The scripts that are on an outside server accessing the database gives me a mysql_connect() error.

Locally I use MySQL 5.0 and PHP 5.0. I am assuming that the 3rd party web host uses an older version of PHP and thinking that may be the problem. Is this the possible problem and if so is there a way to fix it without ruining the scripts that are currently working?

User Table In 5.0
I have a question about the "grande" entries in the 'user' table of
MySql 5.0.0-alpha.What is this?
Also, why are there two rows with "root" (one with localhost and one
with "grande")? Why two entries?

Authentication
I'm new with mysql and I feel very stupid for having to ask this but I'm trying to program against it and I don't know what my username and pw are. When I installed it, I put in a pw so I'm pretty sure I know what that is, but what is the username I should be using when trying to execute sql commands against it with php?

Authentication
Is there any config file or update to have MySQL use HPUX authentication or NT authentication. for the Windows apps. (Query browser and MySQL Administrator)

Authentication
i want to make a user that can only see one database here with a seperate limited access.

Authentication
I am trying to set the root password, but all I get is:

$ ./mysqladmin -u root password <newpassword>
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I have no problems connecting like this:

./mysql -u mysql

In the latter case, I cannot do anything. For example

mysql> CREATE DATABASE one;
ERROR 1044 (42000): Access denied for user ''0'localhost' to database 'MoonlightDB'

Question About User Table In 5.0
I have a question about the "grande" entries in the 'user' table of
MySql 5.0.0-alpha.

What is this?

Also, why are there two rows with "root" (one with localhost and one
with "grande")? Why two entries?

User Table And Version
I am using mysql 3.23.54 that came bundled with RH9. When I do a show =
databases there is no user table, I am working through the reference =
manual for 4.0 is the reason there is no user table because of the =
version? also I have tried updating to version 4.0 using the RPM =
available from the mysql site but on logon the version still says =
3.23.54 and still no user table; any ideas?

Slow Authentication
MySQL V 5.0.18 on SUSE 10.1

I'm not a complete *nix noob, but I sure as hell ain't a *nix or MySQL pro.

This is a new installation. Everything screaming fast. Unless it deals w/authentication.

Try to get in w/SQLyog from W2K locally ... intitial connection takes ~20 seconds. Then everything screaming fast.

Web Server (W03) attempts to connect via MyODBC ... same result ... initial connection takes ~20 seconds. Subsequent queries screaming fast.

VNC into the box at any time ... everything fast. (would seem to eliminate network/connection issues)

Encryption / Authentication
I need to find out if it's possible to do two things with mysql. The =
first is external authentication, preferably with kerberos5, but PAM =
will work as well. Second, encrypting the data stream. Specifically =
with jdbc connections.

Windows Authentication
I would like to a Windows Authentication with MySQL (similar to the Windows Authentication available for SQL Server).

Does anyone knows how it can be done?

Authentication Protocol
I am trying to run an application using MySQL as a DB, but i am receiving the following error message:
"Client does not support authentication protocol requested by server; consider upgrading MySQL client"
I am using MySQL Client Version 5.0.11
Could someone tell how can I fix this issue.

Authentication Protocol
You have no license for using PerlDesk! DBI connect('perldb:localhost','webuser',...) failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at lib/PerlDesk/App.pm line 408 Compilation failed in require at lib/PerlDesk/App/License.pm line 3. BEGIN failed--compilation aborted at lib/PerlDesk/App/License.pm line 3. Compilation failed in require at lib/PerlDesk/App/Installer.pm line 9. Compilation failed in require at C:/Program Files/Apache Group/Apache2/cgi-bin/install.cgi line 25.

Windows Authentication
Can MySQL use windows authentication?
If so, what are the changes to the connection string for this?

Authentication Protocol
I am running winXP, mysql, vb 6.0/vbscript.
when i connect through odbc it gave me the following error.
Run-time error'-2147467259 (800004005)
[MySQL][ODBC 3.51 Driver] Client does not support authentication protocol requested by server; consider upgrading MySQL Client

When i connect this mysql with vb 6.0/vbscript in windows 98 it runs perfectly.

Passwords / Authentication
I have just started messing around with MySQL and something I find weird is that we connecting using localhost, if I supply the password, it will not authenticate...if I leave the password off, it's fine.If I connect from another machine, it requires the password or it will not authenticate.Is that normal?

Authentication Protocol
I recently had a crash with MySQL-Max 4.0.5beta in the Windows 2000 Server inviroment. I uninstalled it completely and salvaged the DATA directories. So i decided to go ahead and upgrade the MySQL to Server 4.1.7. But now I get an error message from all my scripts that tell me the following.
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL
Can some one please assist me in fixing this matter. I am very limited in MySQL and have done hours of research trying to fix this matter.

Support Authentication
i have installed php4.4 with iis and mysql5 and phpmyadmin is 2.5 version and mysql administration tool too i get the error client does not support authentication protocol,
i will be very pleased if someone suggest a good workin version for all mysql php and phpmyadmin

Authentication Protocol
I am having trouble with my MySQL database, so when I run a script I receive the following error:
'Warning: mysql_pconnect() [function.mysql-pconnect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in c:wwwdcdjpaneldatabasedb.php on line 27
Client does not support authentication protocol requested by server; consider upgrading MySQL client'
I understand that it has something to do with old db access libraries. I really don't understand the instructions to be done, so if I could be provided with a full-detail list of instructions on fixing this error, I'd appreciate it.
By-the-way, I looked into the documentation of the MySQL software and looked at the website for support, which was a little pricy for one needed solution.

Authentication Protocol
A problem with MYSQL Front 3.1 that will not connect.
I understand that there is a problem with MySQL changing the password hasing functions in ver 4.
One solution is to start the server with the --old-passwords flag, how do i add the flag??

Sorting A Table According To User Criteria.
I was looking for a some kind of simple solution to this issue. The application requires that certain tables should be showed ordered by the user criteria, for example categories. the user will insert a new category and then he could move up or down the item to the position he wants to show it.

In order to do this, I was thinking to add a column, let's call it 'sort_id' this column will save the position of the record. (this is the best i could come up with, I would love any suggestions). This might create some concurrency problems, but since this is an administration module, I don't think more than one would modify the same table at the same time. Anyway, I couldn't find an easy way to insert a new record in the table with the last position + 1.

Usernames And Password In User Table
I had multiple rows in 'User' table in mysql DB.

namely
% root <no password>
localhost root <no password>
% <null> <null> //anonymous user

Now i want to connect to the server through my application.

I deleted anonymous user, and entry for % root
and set password for localhost root.
Then i created a normal user
'% testuser testpwd' with all the previliges.

So that if i want to connect to  the server from any other machine than server, i have to use 'testuser' account. In my application i am connecting to server using 'testuser'.

Database - User Table - Propagation
I've started a new website and I want to have a database that works with all my other user tables in my other databases. This is my idea.

Background. Example Setup Tree
--Main Page:
-->Forums
-->Mail
-->Collaboration
-->Bug Reporting
-->Etcetera
-->Etcetera
-->Etcetera

*NOTE: Each subsection has it's own database with their own user tables

-------------------------------------------------------------------------------

UserX visits my site. There's a register screen and UserX performs the standard Registration which is then added to the userdb in the usertable.

I want to run a query that will update all subsequent user tables of their own databases.

So, one query or multiple queries will register UserX's info into all those databases.

Once the person is logged into the site, the don't need to register nor login into the other portions of my site, they just click on 'said' link and have access to that portion of the site.

Creating A User-defined Table
I am wanting to create a user defined table in mySQL. The general idea is that they all would have an asset number (PK). After that, the items can be different.

For instance, I may be keeping track of a table, in paticular it's color, size, and cost. OR I might keep track of a computer system, the OS it has installed, who owns it, etc.

Specifying A User To Be Able To GRANT On A Specific Table
I tried giving said user GRANT power on a table, but it isn't working.

He currently has SELECT-only on this table, and nothing more.

the command: GRANT GRANT OPTION ON db.table TO username

Any idea why it isn't working?

Restore Default User Table
For some reason the mysql database does not contain any tables;

How do i restore the default user table?

I tryed to reinstall mysql:

yum remove mysql httpd php php-mysql mysql mysql-server

yum install mysql httpd php php-mysql mysql mysql-server

service mysqld start

[root@localhost] ~ : mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 30 to server version: 4.1.20

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.00 sec)

mysql> use mysql;
Database changed
mysql> show tables;
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'
mysql>

But i still dont have permission to create a new database, cause mysql database have no tables.

Authentication / Permission Basics
I have a number of users like 'fred', who can access MySQL 4.1 from %.fredworld.com. He has full access to his own database, fred. No other permissions defined.

What's the best way for me to allow every user to connect from localhost. After reading up on http://dev.mysql.com/doc/refman/4.1/en/connection-access.html I thought the answer might be to do:

insert into user (host, user) values ('localhost', '');
flush privileges;

but this doesn't do what I want. How should I go about this?

Client Does Not Support Authentication
The problem is that when i browse to http://reception/admin/index.php? and enter username and password I recieve the following message

1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

But i can log into mysql using the command prompt

Configure 2 Sites To Access One User Table
I have two databases on the same server with different domains. I would like both sites to access the same user database table. They have the same fields.

I thought that it might just be done with an mysql command, which will point one table to the other.

Create User Table With An Encrypted Variable
I'm trying to come up with a user database for logging onto my server where the passwords stored in the table under the column "password" are encrypted. I also need another script I have to understand when it's been 30 days since the password was changed, so I need to capture the date the password is changed. I've looked at a few reference manuals and tried the code:
CODEcreate database auth;
use auth;
create table auth (
name varchar(7) not null,
pass varchar(9) ENCRYPT not null,
fullname varchar(30) not null,
date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
deptnumber varchar(4),
phonenumber varchar(10),
cellnumber varchar(10),
primary key (name)
);
insert into auth values
('name', ENCRYPT 'pass', 'fullname', 'NOW()', 'deptnumber', 'phonenumber', 'cellnumber', );

insert into auth values
( 'someuser', ENCRYPT ('test12345'), 'Joe User', 'NOW()', '3421', '504 257-0000', 'none' );

Table Creation Based On User Login
I'm trying to build a website that will allow the addition of users (w/ username, password, etc.).

That seems simple enough.

But is it possible to set something up (in PHP, for example) that will create a new table in the database for each new user?

Ex. John Smith signs up, is verified, and a PHP script (or Java, or whatever) creates a table specifically for him.

I know I'll need a master table of usernames, passwords, etc. These new tables would store certain user-specific data, such as preferences and other data the user might want to restrict access to.

I know I could store all of this information in a master table, but I'm trying to think ahead. Worst case scenario, if there are millions of users (unlikely, but not impossible), I'd hate to have all that data in one table, but if I have to, I can.

Error 1036: Table 'user' Is Read Only
For some odd reason, the user table that contains all the priveleges and such is read only... I can't write to it... thus I can't change my password or permissions or anything of the sort.

I've tried reinstalling the databases, but no luck, same thing... i checked permissions on /var/lib/mysql/mysql/ and all the files under it and i gave write access 2 mysql.mysql... so i dont know whats going on.

Connection String Authentication To My Server
I'm having a tough time figuring out the proper connection string to connect to my existing database.

Using:
* MySQL server 4.0 on a remote Linux Server.
* Developing in VS 2005 (VB) on a PC that is apart of our corporate MS domain.
* Downloaded and installed Connector/Net 2.0

Problem:
I'm using the connection string: ("server={0}; user id={1}; password={2}; database=test; pooling=false", server.Text, userid.Text, password.Text)

When executed with userid="sam" the error message that is returned is "Access denied for user: "sam@<mypc>.<corporatedomain>.com"

When executed with the userid="sam@<remotehost> the error message returned is "Access denied for user "sam@<remotehost>@<mypc>.<corporatedomain>.com". No matter what I do, the connector keeps appending my current domain id to the end of the user string.

"sam" is a authorized user for the MySQL on the remote linux host (been using it for years).

Client Does Not Support Authentication Protocol
If I create a user, say 'dbadmin' with full access on hosts 'All' and 'localhost' I cannot connect using PHP. I get the error:

mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client.

If I make the connection with root on any of the local IP addresses the connection is fine and the database updates correctly.

Any thoughts? I suspect a problem with the use of the socket, but phpinfo() correctly returns the mysql settings.

Support Authentication Protocol Upgrade
I have been using a script on my server for 2 years today I get this message Is it the script or the server?

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home2/cruisew/public_html/cruisevacationcenter.net/test/inc/db_wrapper.php on line 11
AAAClient does not support authentication protocol requested by server; consider upgrading MySQL client

Authentication Problem On Nonstandard Port
I am running two database instances of mysql (one on a nonstandard
port). After granting users permissions I find that I can access
mysql from other machines only if I use the standard port. When I use
the non-standard port I can only authenticate if I am on the box where
the database is running. Also some previously set up users can
authenticate through the non-standard port (sadly no one knows how
those users were set up). What do I need to do to allow for
authentication on the nonstandard port ex:

mysql -h<HOST> -u<USERNAME> -p
(defaulting to standard port works)
mysql -h<HOST> -u<USERNAME> -P<NON-STANDARD PORT> -p
(fails)

Populating Matrix Table Based On Books Taken By User
I've been trying to do this for 2 hours now. My noobness in mysql is not letting me get through =(

USERS:
id_user | f_name | l_name
1 | mike | smith
2 | david | bush
etc...

BOOKS:
id_book | s_name | l_name
10 | book 1 | walking together
20 | book 2 | straight path
21 | book 2A| crooked path
etc....

REGISTRY:
id_fk_user | id_fk_book
1 | 10
1 | 21
2 | 10
2 | 20
2 | 21
etc....

Now, I am trying to fill out a table by row using pear's HTML Table that would end up like this:

Name | ID | Book1 | Book2 | Book 2A | etc..
mike smith | 1 | x | | x | etc..
david bush | 2 | x | x | x | etc..

I am having a hard time because the table wants each row's data separetly before it send it to HTML output. And my SQL statement looks like this:

SELECT id_user, f_name, l_name, id_book
FROM USERS, BOOKS, REGISTRY
WHERE id_user = id_fk_user
AND id_book = id_fk_book

which gets me:
1 mike smith 10
1 mike smith 21
2 david bush 10
2 david bush 20
2 david bush 21

1251 Client Does Not Support Authentication Protocol ....
I just installed MySQL 4.1 on my computer! While i was working with a Dreamwaver I tried to connect to MySql but i coldn't! The following massage appeared:

1251 Client does not support authentication protocol requested by server; consider upgrading MySQL client.


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