472,347 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,347 software developers and data experts.

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

310 100+
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 2773
NeoPa
32,511 Expert Mod 16PB
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 100+
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,511 Expert Mod 16PB
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 100+
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,511 Expert Mod 16PB
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 100+
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,511 Expert Mod 16PB
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...
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...
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...
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. ...
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...
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...
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...
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...
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.