Sunday, March 12, 2017

mysql - select query denied error

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

Solution :

You are getting this error because you are logged into the mysql user account where Select_priv is set as N for the user.

If you are able to modify your own privileges that is really good (Generally this can't be done because of security) otherwise you need to login with super user and need to set this privilege as Y.

Run this query :

update user set Select_priv = 'Y' where User = 'username';

Changes will not take effect after running this query. You will have to flush privileges.

Run Query :

FLUSH PRIVILEGES;

After flushing privileges, if still you face denied error for select query, Log out from mysql, Log in again with same user and running select query again.
You will not get the error.

If you get same denied error for Insert, Update and Delete queries, you need to set them as Y using same method.

Restarting mysql does the job but every time you do not have command line access to restart it that's why you need to flush privileges.

Friday, February 3, 2017

Magento - No trailing slash appears after domain name

Magento - js/css/image files are not loading because no trailing slash appears after domain name

No trailing slash after domain makes all js/css/skin/media urls 404.

Solution :
Give trailing slash in domain name in column web/unsecure/base_url and web/secure/base_url of table  core_config_data.


http://domainname/

Even if problem persists, login as admin.


Go to system > cache management
Flush all cache including 'flush magento cache' and 'flush cache storage'.


Now open site url. You should not get this issue.

Monday, January 9, 2017

Composer is getting stuck on installing dependencies

 php composer update stuck

Solution :

a) Download and Install updated composer
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-14-04

b) Use update command with verbose mode
composer -vvv update
It will display every single output and you will not be impatient.