473,473 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to set user ID when linking Access to a MySQL database?

310 Contributor
I have the task to set up an application at work,using MS Access as a front end to a MySQL database. This will be done using an appropriate ODBC driver, and linking the MySQL database to Access.

My question is whether it is possible to set something up so that when linking to the MySQL database, the user name which is used for the MySQL connection is taken as the user's Windows ID. If so, then I can set up users and access grants in MySQL that are individual to the user.

Is this possible?

Or does anyone have a suggestion for another way to do something like this? The point is that there may be individual table access rights for different employees, and the only way I know how to implement this is to do it via the user name that is used in the ODBC linking from Access, where MySQL will have the correct grant access permissions set up for each user. But how to get Access to either automatically use the user's Windows ID (or cause a window with a blank field for this to appear) when doing the link to MySQL?

Thanks for any help!
Aug 20 '08 #1
7 2843
NeoPa
32,556 Recognized Expert Moderator MVP
This sounds very much like a MySQL specific question to me. I could answer this for MSSQL, but even then only as an MSSQL MCP, not from my Access knowledge.

Let me know if you'd like me to move this thread across to the MySQL forum for you.
Aug 20 '08 #2
coolsti
310 Contributor
Actually, I would have posted this in the mysql forum myself, but I really believe it is an Access issue, not MySQL. How to set up users and passwords and giving them specific grant rights to tables in a database in MySQL is clear to me and is not the problem.

I am wondering whether Microsoft Access and Microsoft Windows are working together so that Access can be made to automatically take the identity of the user logged on to the PC as the user ID that is used for the link connection to the MySQL database.

I know that I can set up an ODBC connection using the MySQL ODBC driver to connect from Access to the MySQL database with a predefined user ID and password. What I would like to do is to not predefine the user ID and password in this connection form, but have it appear in Access either as blank fields that the user needs to fill in with his/her ID and password, or perhaps with the user's ID already in the user ID field.

Since the driver is a MySQL ODBC driver, perhaps it is a MySQL question, but I have a feeling that Access users (hence this forum) might understand this better.

If you have the solution for MSSQL, can you let me know what it is? It may help me figure it out for MySQL since the basic idea should be the same.
Aug 20 '08 #3
NeoPa
32,556 Recognized Expert Moderator MVP
It would mainly involve configuring the security on the MSSQL server to use and match the accounts you intend to use to access it with. I set up a basic user group and a separate Admin group in my server. These match the Domain Users and Domain Admins Windows groups.

From the ODBC setup (not Access you notice - I'm sure this is not Access specific at all) I make sure the MSSQL driver is set up to connect using Windows security.

I don't have MSSQL running at home as I find very little need for it (and it's a heavier overhead than Office which I use anyway) so I'm not able to check out details easily for you.
Aug 20 '08 #4
coolsti
310 Contributor
It would mainly involve configuring the security on the MSSQL server to use and match the accounts you intend to use to access it with. I set up a basic user group and a separate Admin group in my server. These match the Domain Users and Domain Admins Windows groups.

From the ODBC setup (not Access you notice - I'm sure this is not Access specific at all) I make sure the MSSQL driver is set up to connect using Windows security.

I don't have MSSQL running at home as I find very little need for it (and it's a heavier overhead than Office which I use anyway) so I'm not able to check out details easily for you.
I think you may have helped me somewhat. I believe I saw something in an ODBC setup window about whether or not to use some sort of Windows authorization, and perhaps this is what you have used for MSSQL. I will try to find this again and see if it can be set up to use our domain security groups. That would definitely solve my task here. I can set up the MySQL accounts to be named as I wish, so probably I could get this working for MySQL just as you have for MSSQL.

Thanks for the help!
Aug 21 '08 #5
NeoPa
32,556 Recognized Expert Moderator MVP
Let's hope it's as simple as that. Let us know how you get on. If you need, I can always move this across. Just post in here if that's what you would like to see happen. Any time.
Aug 21 '08 #6
coolsti
310 Contributor
I can see it does not seem to be so automatic with MySQL as with MSSQL. When I select the MSSQL driver for setting up an ODBC link, there is the option to use Windows login information, but this does not happen with the MySQL driver.

But I have found what I can use. By setting up a machine datasource to point at the correct server where the MySQL database is located, giving it a name, giving it a description, and filling in the database name, but leaving the user ID and password blank, I can get pretty much what I want.

I just need to instruct the users to link to this datasource, and when they try to do so, the datasource form appears with everything filled out except for user ID and password. I will then ask everyone to use their Windows login ID, and an individual password. I will then set up the grant permissions in MySQL using these user ID's and passwords. Since there will only be a handful of users, this is manageable. If there were more users, I would use fewer generalized group names and passwords instead of individual user ID's, set these up in MySQL, and instruct the users about what (group) user ID and password to use.
Aug 21 '08 #7
NeoPa
32,556 Recognized Expert Moderator MVP
That sounds workable :)
Aug 21 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ben Binskin | last post by:
Im rather new to developing mysql/php applications and am after some advice on handling user validation for a web based system, ive implimented a number of ways and would like to know which way is...
3
by: Robert Morgan | last post by:
Hi, is it possible to link databases within mysql? I have a access database that I need to import into mysql this db consists of 4 other dbs linked together sharing a common switchboard. Can I link...
3
by: dstewart | last post by:
Situation: One common MySQL database server on SuSE 9.1 with all updates. Uses 'rinetd'. Has entries for the appropriate IP addresses of all servers. NOTE: If the appropirate entries are NOT in...
5
by: premmehrotra | last post by:
I currently have a multi-user access database which is put on a shared drive L: on a Windows Servers. Entire database is one file premdb.mdb. Users access this database from their laptops....
6
by: Bob Sanderson | last post by:
I have created a MySQL database for my company which is accessed by PHP pages. I would like to permit some users to edit the records but allow others read-only access. However, I don't want to have...
2
by: majestic12 | last post by:
This is the first time I've tried to use mysql/phpmyadmin and I'm having trouble. I'm using a geocites pro account and I got both installed and it set up a database call mysql and the user yroot. ...
4
omerbutt
by: omerbutt | last post by:
hi every one I am A new Bee to php mysql and i was surfing through the net to learn about how to secure the mysql when you are working in a web environment while working with php html and javascript...
9
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who...
4
by: IT Couple | last post by:
Hi I have an MySQL database v5 on the web with data from my MS Access database which I migrated. I want give options to my customers to interact with the database so I want to move it entirely...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.