Questions tagged [mysql-error-1142]

Error 1142: SELECT/UPDATE/CREATE command denied to user '%s'@'%s' for table '%s'

Error 1142: SELECT/UPDATE/CREATE command denied to user '%s'@'%s' for table '%s'

22 questions
696
votes
11 answers

MySQL: Grant **all** privileges on database

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…
marioosh
  • 27,328
  • 49
  • 143
  • 192
72
votes
17 answers

Error: select command denied to user ''@'' for table ''

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 ''@''…
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
37
votes
1 answer

CREATE command denied to user?

show grants for charm@'localhost'; ---------------------+ | Grants for charm@localhost …
37336792
  • 473
  • 1
  • 6
  • 13
14
votes
4 answers

CREATE command denied for user that has GRANT ALL PRIVILEGES

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…
Brad
  • 159,648
  • 54
  • 349
  • 530
9
votes
2 answers

GRANT DELETE ON database.table TO username@'%';

I have given a user full control over one table in a database. Hoever it appears they cant delete records. I've tried as a privilaged user: GRANT DELETE ON databasename.tablename TO username@'%'; flush privileges; But delete stil doesn't…
Nathan Friend
  • 205
  • 1
  • 3
  • 10
6
votes
2 answers

How do I enable cross-database joins in mysql?

I am trying to port some data over from my production database to my sandbox using a query like this: INSERT `dbsandbox`.`SomeTable`(Field1, Field2, Field3) SELECT t.Field1, t.Field2, t.Field3 FROM `dbprod`.`SomeTable` t; When I attempt this…
Chris
  • 317
  • 1
  • 2
  • 8
5
votes
4 answers

MySQL stored procedure fails on second call on same connection with "SELECT command denied to user 'user'@'localhost' for table 'view_name'

I have a table called sales_observation_daily_summary which is a materialized view of sales_observation_daily_summary_view. I have defined a stored procedure called sync_daily_summary_view_with_table that will refresh the materialized view. …
jhericks
  • 5,833
  • 6
  • 40
  • 60
5
votes
3 answers

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

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…
Drarok
  • 3,612
  • 2
  • 31
  • 48
2
votes
2 answers

MySQL: grant permissions denied for CREATE

I setup a database & user along with grant permissions how I normally do and I'm still getting access denied and I'm not sure why: [root@server23 redditonrails]# mysql -u redditonrails -p Enter password: Welcome to the MySQL monitor. Commands end…
Zeno
  • 1,769
  • 7
  • 33
  • 61
2
votes
1 answer

Analyzing a MySQL table gives ERROR 1040 - Too many connections

Why is it that when I run ANALYZE TABLE table_name_here The MySQL server starts giving out this error: 1040 - Too many connections I've run this thru PHPMyAdmin btw.. And the table contains over 15 million rows of data. Is there a way to fix…
officeboi101
  • 219
  • 4
  • 16
2
votes
1 answer

Help find security flaws in this MySQL page?

I am trying to find security flaws in a MySQL page. It is an assignment for a class learning about SQL. Through a textbox, they will be given access to a database to submit queries and see if it returns the correct data sets. I want to find out if…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
1
vote
3 answers

MySQL: ERROR 1142 (42000) and ERROR 1064 (42000)

I'm using windows 7. I've downloaded mysql-5.5.16-win32.zip and installed it. I started MySQL server successfully, but I get this error: C:\Program Files\Mysql\bin>mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection…
cProg
  • 535
  • 3
  • 10
  • 16
1
vote
1 answer

How to query the columns of a table when INFORMATION_SCHEMA gives acces denied?

What I am trying to do is get all the columns of a table (the table can be empty) Example of what I did before: SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'aTable' AND table_schema = 'theDatabase' it works perfectly…
matthy
  • 8,144
  • 10
  • 38
  • 47
1
vote
1 answer

Incrementing Slower Data Insertion into mySQL

Background: We have large flat files span around 60GB and are inserting into database. We are experiencing incremental performance downgrade during insertion. We have 174 (million) records and expecting another 50 (million) to be inserted We have…
Ahmed Memon
  • 219
  • 3
  • 11
0
votes
0 answers

MariaDB: ERROR 1142: DROP command denied to user

Granted SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE, DROP on a database to one of our account and flushed privileges as well but still when I run drop table db_name.table_name with the same account for the same database I get error "ERROR 1142:…
1
2