mysql-error-1142

Error 1142: SELECT and LOCK TABLE commands denied

╄→гoц情女王★ 提交于 2020-01-06 07:53:18
问题 I reinstalled the server running MySQL. I had created a backup of the database by using MySQL Workbench. Now I'm trying to import the dump in to the database trough the same program but I get the following error: ERROR 1142 (42000) at line 656: SELECT,LOCK TABL command denied to user 'root'@'MIKKOS' for table 'events_waits_summary_by_thread_by_event_name' I tought that root had full privileges. I ran the following but the same error appears with the previous query after executing this: GRANT

Is there a better way to assign permissions to temporary tables in MySQL?

丶灬走出姿态 提交于 2019-12-23 11:52:16
问题 Our users log into the production database as a fairly low-level user, with SELECT granted at the database level, and INSERT/UPDATE/DELETE granted on the specific tables they need access to. They also have permissions to create temporary tables (we need them for some of the more complicated queries). The problem is that whilst they can create the temporary tables, they don't have access to INSERT into them! A workaround we have found is to create a "real" (persistent?) table of the same name

CREATE command denied for user that has GRANT ALL PRIVILEGES

£可爱£侵袭症+ 提交于 2019-12-08 17:06:28
问题 I am trying to set up a MySQL replication slave, and am having a very difficult time running LOAD DATA FROM MASTER; . Yes, I know it is deprecated, but I am running MySQL 5.1, and that isn't my problem at the moment. For some reason MySQL keeps telling me the CREATE command is denied, but a check of SHOW GRANTS says otherwise. Check this out: mysql> SHOW GRANTS; +--------------------------------------------------------------------------------------------------------------------+ | Grants for

php multiple databases issue

☆樱花仙子☆ 提交于 2019-12-08 10:05:15
问题 I've set two database conections as below $con1 = mysql_connect("localhost", "root", "pwd") or die (mysql_error()); $con2 = mysql_connect("localhost", "wordpress", "pwd", true) or die(mysql_error()); mysql_select_db("lab_ancp", $con1) or die(mysql_error()); mysql_select_db("wordpress",$con2) or die(mysql_error()); and it works fine so then i do some queries on a page like this: $sql="select unome from associado where uid=$uid"; $result=mysql_query($sql,$con1) or die(mysql_error()); and it

CREATE command denied to user?

痞子三分冷 提交于 2019-11-28 11:53:47
show grants for charm@'localhost'; ---------------------+ | Grants for charm@localhost | +-----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'charm'@'localhost' IDENTIFIED BY PASSWORD '*EDD1CD76B1331E363B2BAED3F0B7EAF28559FBEWD' | | GRANT ALL PRIVILEGES ON `charmstyle_com`.`charmstyle_com` TO 'charm'@'localhost' i used grant all on charmstyle_com to charm@'localhost' IDENTIFIED BY 't1q4gytrur'; flush privileges; then i import the database,it shows an error: ERROR 1142 (42000) at line 29: CREATE command

CREATE command denied to user?

醉酒当歌 提交于 2019-11-27 06:34:29
问题 show grants for charm@'localhost'; ---------------------+ | Grants for charm@localhost | +-----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'charm'@'localhost' IDENTIFIED BY PASSWORD '*EDD1CD76B1331E363B2BAED3F0B7EAF28559FBEWD' | | GRANT ALL PRIVILEGES ON `charmstyle_com`.`charmstyle_com` TO 'charm'@'localhost' i used grant all on charmstyle_com to charm@'localhost' IDENTIFIED BY 't1q4gytrur'; flush

Error: select command denied to user '<userid>'@'<ip-address>' for table '<table-name>'

左心房为你撑大大i 提交于 2019-11-26 18:51:35
In my website, I am using MySQL database. I am using a webservice where in I do all my database related manipulations. Now In one of the methods of that webservice, I get the following Error. select command denied to user ''@'' for table '' What could be wrong? Below is the code where I get that error. I tried debugging and found that it fails at the line MySqlDataReader result1 = command1.ExecuteReader(); Here is my code: String addSQL = "Select Max(`TradeID`) from `jsontest`.`tbl_Positions"; MySqlConnection objMyCon = new MySqlConnection(strProvider); objMyCon.Open(); MySqlCommand command =

Error: select command denied to user &#39;<userid>&#39;@&#39;<ip-address>&#39; for table &#39;<table-name>&#39;

巧了我就是萌 提交于 2019-11-26 06:37:12
问题 In my website, I am using MySQL database. I am using a webservice where in I do all my database related manipulations. Now In one of the methods of that webservice, I get the following Error. select command denied to user \'\'@\'\' for table \'\' What could be wrong? Below is the code where I get that error. I tried debugging and found that it fails at the line MySqlDataReader result1 = command1.ExecuteReader(); Here is my code: String addSQL = \"Select Max(`TradeID`) from `jsontest`.`tbl

Grant **all** privileges on database

和自甴很熟 提交于 2019-11-26 01:24:50
问题 I\'ve created database, for example \'mydb\'. CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER \'myuser\'@\'%\' IDENTIFIED BY PASSWORD \'*HASH\'; GRANT ALL ON mydb.* TO \'myuser\'@\'%\'; GRANT ALL ON mydb TO \'myuser\'@\'%\'; GRANT CREATE ON mydb TO \'myuser\'@\'%\'; FLUSH PRIVILEGES; Now i can login to database from everywhere, but can\'t create tables. How to grant all privileges on that database and (in the future) tables. I can\'t create tables in \'mydb\' database. I