Error after site Migration - Access denied for user 'www-data'@'localhost' (using password: NO)

I faced this error last year when we tried to move to EasyEngine, but unable due to this error, now having again. Message we are getting

Error on Functon *table_name* - Access denied for user 'www-data'@'localhost' (using password: NO)

Things we have tried

  1. Give all permission to the DB User created by EE

  2. Create a new user

  3. Disable the plugin that use that specific table. Then it hangs in the next table

  4. Tried to connect to our remote db server from EE install, same issue.

So, its not a permission issue.

  1. Basic WordPress install works fine.

  2. We tried clean cookie, change timezone, update.

Site is on Latest WordPress 4.2.3 and we are testing on EE 3.3.3. And its almost basic EE setup with w3tc.

Ok, my team solved it. We just rewrote all code of one plugin that used direct DB query. It was written about 4 years ago, and we did some stuff that was impossible do within WordPress, but now with recent WP it was possible, so we rewrote, working fine now.

We are getting this error 400 every now and then, in front end, backend, dashboard.

What to do? @rahul

Here is full error message.

400 Bad Request

Request Header Or Cookie Too Large nginx

Ok, I solved it adding this line in server block

large_client_header_buffers 8 64k;

But I added directly in “sites-available” for that particular domain. Why this value was not set in any file. And I know in any EE update this conf file get changed to basic. Where I could add this server level option? How?

@Asif2BD

you can put custom configuration for your site at location /var/www/example.com/conf/nginx/custom.conf

these changes will not be updated after you update your site.

Codes I add in this conf file will be added in server block? I just could write this code?

large_client_header_buffers 8 64k;

Could I add nginx filter for adding very header here too? How?

Yes it will be included in server block. yes just write this code there.

You can refer this http://wiki.nginx.org/HttpHeadersMoreModule for adding headers