privileges

I can not find my.cnf on my windows computer [duplicate]

筅森魡賤 提交于 2019-11-26 08:03:43
问题 This question already has an answer here: What is the location of mysql client “.my.cnf” in XAMPP for Windows? 14 answers My computer is Windows XP. I need to find my.cnf to get all privileges back to the root user. I accidentally removed some privileges of the root user. I still have the password and there is no problem for me to log in to MySQL as the root user. But I can not alter a table. 回答1: Here is my answer: Win + R (shortcut for 'run'), type services.msc , Enter You should find an

MySQL grant all privileges to database except one table

此生再无相见时 提交于 2019-11-26 07:34:03
问题 I\'ve been unable to find a reasonable solution to achieve the following: I wish to have a user that has ALL privileges on a database (or series of databases with the same schema), except for one table, to which they will only have SELECT privileges. Essentially I want the user to have free reign over a database but not to be able to update a specific table. So far I have tried, to no avail: Granting all privileges on that database (db_name.*) and then specifically granting only select

Permission denied for relation

╄→гoц情女王★ 提交于 2019-11-26 06:52:43
问题 I tried to run simple sql command: select * from site_adzone; and I got this error ERROR: permission denied for relation site_adzone What could be the problem here? I tried also to do select for other tables and got same issue. I also tried to do this: GRANT ALL PRIVILEGES ON DATABASE jerry to tom; but I got this response from console WARNING: no privileges were granted for \"jerry\" Do you have some idea what can be wrong? 回答1: GRANT on the database is not what you need. Grant on the tables

My database user exists, but I still get an (HY000/2002): No such file or directory

别等时光非礼了梦想. 提交于 2019-11-26 05:34:10
问题 I\'m trying to install vanilla forums on my Mac, and for this I just created a database and a user from the mysql command line: mysql> CREATE DATABASE vanilla; Query OK, 1 row affected (0.00 sec) mysql> create user \'vanilla_user3\'@\'localhost\' IDENTIFIED BY \'vanilla_password\'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON * . * TO \'vanilla_user3\'@\'localhost\'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) So I

Detect if Java application was run as a Windows admin

可紊 提交于 2019-11-26 04:47:40
问题 I have a Java application. Is there anyway I can tell if the process was run with admin privileges, on Windows 7. 回答1: I found this code snippet online, that I think will do the job for you. public static boolean isAdmin() { String groups[] = (new com.sun.security.auth.module.NTSystem()).getGroupIDs(); for (String group : groups) { if (group.equals("S-1-5-32-544")) return true; } return false; } It ONLY works on windows, and comes built in to the core Java package. I just tested this code and

Make Inno Setup installer request privileges elevation only when needed

∥☆過路亽.° 提交于 2019-11-26 04:36:22
Inno Setup installer has the PrivilegesRequired directive that can be used to control, if privileges elevation is required, when installer is starting. I want my installer to work even for non-admin users (no problem about installing my app to user folder, instead of the Program Files ). So I set the PrivilegesRequired to none (undocumented value). This makes UAC prompt popup for admin users only, so they can install even to the Program Files . No UAC prompt for non-admin users, so even them can install the application (to user folder). This has some drawbacks though: Some people use distinct

How can I restore the MySQL root user’s full privileges?

回眸只為那壹抹淺笑 提交于 2019-11-26 03:33:39
问题 I accidentally removed some of the privileges from my MySQL root user, including the ability to alter tables. Is there some way I can restore this user to its original state (with all privileges)? UPDATE mysql.user SET Grant_priv = \'Y\', Super_priv = \'Y\' WHERE User = \'root\'; # MySQL returned an empty result set (i.e. zero rows). FLUSH PRIVILEGES ; # MySQL returned an empty result set (i.e. zero rows). #1045 - Access denied for user \'root\'@\'localhost\' (using password: YES) GRANT ALL

How to elevate privileges only when required?

时光毁灭记忆、已成空白 提交于 2019-11-26 00:38:21
问题 This question applies to Windows Vista! I have an application which normally works without administrative privileges. There is one activity which does need administrative privilege but I don\'t want to start the application itself with higher privileges when I know most of time user wont even be using that feature. I am thinking about certain method by which I can elevate the privileges of application on some event (such as press of a button). Example: If user clicks this button then he is