Tool for editing MySQL table permissions? - mysql

Is there a tool that makes the task of editing user privileges easier on a MySQL database? I've got nearly 100 tables to work through for 4 users, each with different per-table grants, which is getting tedious via phpMyAdmin. It'll get a lot more irritating when I make changes to the database structure and user list later on. I also can't see a way to do it in MySQL Workbench.
Are there any permissions management tools that make management of table permissions easier?
Update: For clarification, I need a tool that can manage the per-schema and per-table permissions for a user. I'll be changing permissions later, so it needs to be able to fully manage existing permissions as well as grant new ones. MySQL Workbench allows management of per-schema privileges, but not per-table.

Mysql gui tools . See here http://dev.mysql.com/downloads/gui-tools/5.0.html
MySQL Administrator allows you to do all that.

I realize the question is a couple of years old but I came across it while looking for a solution so I suppose others might as well.
I came across SQL Yog and find it capable of doing all that I wanted. I use the community version so it is free to download and its User Manager has the capability to set permissions at the schema and table level.

Workbench is supposed to let you manage users and grant privileges -- see here. You can also use Navicat (not free) or if you are on a mac, Sequel Pro, which is free.

MySQL Workbench provides this functionality.
Open a connection via 'Server Administration'
Click on 'Users and Privileges'
Select the 'Schema Privilegs' tab
Create entries for the schema you're working on, per your needs.
More information here.

Just looked at my install of Squirrel-SQL here. I've only got Oracle databases in this copy of it, but I use it for MySQL at home. Anyway, for Oracle, for tables, it has two tabs: Privileges, and Column Privileges. It may or may not provide similar functionality for MySQL. Give it a look perhaps. (I like it for other database work.)

Try Security Manager tool in dbForge Studio for MySQL (the Security Manager is available in free Express Edition).
In new version multi-user editing is supported; you can select some users and grant or revoke Global and Object (database, tables, fields, ...) privileges, then apply changes or view them in SQL script.

You may want to look at www.securich.com - its an open source user management tool for MySQL.

phpMyAdmin allows table-level privileges. More details can be found, for exemple, here and here.

Related

MySQL is hiding my Routines (stored procedures)

After creating a couple of Routines in MySQL, I came back to my database and they were missing, but still showing the name.
It says that I might be lacking the privileges necessary to edit them, but that is not the case. I am logged in with the same account that created them, which is an admin account.
To see if they were in the information_schema, I ran this:
SELECT routine_definition
FROM information_schema.routines
WHERE routine_schema = 'databasename';
...but it shows two null entries.
Are my Routines completely gone? Did I do something wrong when creating them?
I've used MySQL for years and haven't had this happen before.
EDIT:
I just called the Routines and they do work... meaning they return the data. My only issue is that I cannot view or edit the code.
In Motion Hosting responded with an explanation.
Unfortunately due to the recent changes by cPanel, use of MySQL routine is not something that is officially supported on a shared hosting plan. While it may be possible to manually create it through a custom phpMyAdmin install via your cPanel credential, the interface provided by cPanel will no longer work to modify routines. If you need support for routines, you will need to upgrade to a VPS or higher plan.
From what I understand, MySQL sets the security of the routine to "DEFINER" which identifies you by your login. Once you log out and back in, that ID has changed, thereby hiding your routine code.
Similarly, the routines do not show up in a MySQL backup, either.
Depending on which hosting service you are using. Although I have researched several times on Google, I have not found any solution that works for me.
As soon as I log in with cpanel -> phpmyadmin I am unable to run routines.
I am unable to edit and export routines
Solution :
Log in as the root user of whm
From the left menu bar, search for phpmyadmin Access to PHPMyAdmin's root account
Routines will be accessible to you routine access

How do you generate a create users script from an existing MySQL db?

Have inherited a MySQL database that was completely trashed by the latest Windows 10 build update. The server lost all the user and schema information.
I restored the database back and recreated the users, set all the permissions etc. Obviously I would like to mitigate against this happening in the future but can see no obvious way from workbench to generate a script to create the users and set the permissions as you would from SQL management studio.
Is this possible?
Yes this is possible.
You can execute requests with a batch that is loaded by MySQL with a command from the shell to make what you want done.
I had not tested it myself but I think this link could be helpful.

Using MySQL for a local database

I have written a program for a client that manages orders for his photography/souvenir business. However, I am trying to implement a DBMS for him so that he can do some analysis of the relevant trends over time.
The client's machine is a standalone Windows 8 PC.
I am attempting to use MySQL as he doesn't wish to purchase MS Access. However, he only wants it to be stored locally on the same machine he takes the orders on. How would I go about setting this up? I am new to database management so some detail would be really helpful!
You can follow MySQL's documentation to install. They have a GUI.
Once installed make sure to add a strong root password.
I would also create a database MyAwesomeNewDatabase specifically for your data. Then create a user for your application to use that is limited to just the database.
GRANT ALL PRIVILEGES ON MyAwesomeNewDatabase.* To 'user'#'localhost' IDENTIFIED BY 'password';
Then your application can use 'user' and 'password' to communicate. Specifying localhost means 'user' can only log in if on that machine, which you indicated is the case.
You indicated VB.net. You will need to install mysql-connector-net
Then in Visual Studio add reference to the dlls. Codeproject has a good tutorial on this.
You can always use DB at local computer. All you need to do is change the DB config done in your project. Change the address to localhost. I may be able to help more if i get the language you're working upon and the part of code where DB credentials are defined.
You can use Portable MySQL ,probably this Link help to you:
Designing Applications for Portability
You can always use DB at local computer Normally ...
sqlite is better for portable programming!

How do I look at the schema of a MySQL database on cPanel?

My question isn't so much programming specific, I guess, but more interface-specific. My problem is that I need to look at the schema of some MySQL databases which are stored on a server that uses cPanel. How do I just simply look at their table and column names remotely?
You will probably have "phpMyAdmin", installed in the "databases" section of your cPanel. This will allow you to look at the schema of all databases the user you log in as can see.
In addition, this is probably more of a fitting question for http://serverfault.com
login to the cpanel and use phpmyadmin web application to view your database.

How can I get back my privilege to create a new database in MySQL?

I can not use MySQL. MySQL is on my local computer. Currently I added skip-grant-tables in My.ini so I can use MySQL. But I have no privilege to create a new database. My problem is tough, although I asked related questions on SO, but no answer can resolve my problem. I almost give up. So I lower my expectation. I am developing a website, so I need to create database, tables and operate tables. You don't have to consider security. Is there a simple solution that can give me privilege to create a new database? Maybe by adding some command in my.ini or something? You won't need to completely resolve my problem. Maybe after the development, I will upload the database and tables to another server(The current database server is my personal computer, windows XP) so I can uninstall and reinstall MySQL.
The root of problem is that I lack privileges.
I'm not sure if this will work for you, since you might need to have elevated privileges in the first place, but it's worth a shot.
There should be a database called mysql. Take a look in there, and you'll see a table called users. For each record, there's a heap of columns named Select_priv, Insert_priv, etc. For your user record, change each of these to "Y".
It sounds a bit like your installation went astray.
Maybe uninstall/resinstall is your best option, assuming that you've never been able to connect, so there is no data to consider.
Take your time on the installation, and have a look at MySQL Postinstallation Notes
you have 4 questions open about this specific problem. instead of opening duplicates, you should instead update just one of them with new information.
but the simple solution to your problem is to download the ZIP file of mysql for your mysql version from the mysql website and just copy the data\mysql folder in to your data file, then restart the service. this will give you a root user with a blank password that has full access.