You didn't mention what country you are from. Here in the US, it is quite common and usual to see a therapist when you or your children are having behavior problems. Since you say he said "his friends are not coming regularly", and from the way you phrase things, I suspect you will not be in the US, so I don't know what your feelings are about therapy or if it is even available to you.
One thing you might do is speak to his teachers. Find out how he is doing in school. Is there something that happens there that he is afraid of? He may have told you that school was "too long" because he didn't want to say what the real problem is. If something is happening at school that is worse than being beaten with your stick, you should be responsible to find out what it is and help him deal with it. If my son were to suddenly object so violently to going to school after looking forward to it, I would strongly guess he is afraid.
If you cannot determine that there is anything bad at school, and it is just very hard for him, it might be that he has some sort of learning difficulty that makes school extra frustrating. This is also a case where his reactions may be based on fear. Children fear failure. Here is another area that his teachers could help you with. Ask them for things that you might do to help your son learn. Then, this is an opportunity to turn a disadvantage (grandmother with soft heart) into an advantage (tell her that her grandson needs her help with his learning and see if she will help).
If you can figure no other answer except that he does not like school, it is common knowledge that positive incentives work much better than negative ones. That means offering him rewards for good performance works much better than striking him for bad. You say "I usually never say no to him". Maybe now is a good time to do this. Rewards work better if they are not already getting everything they want.
(Remember, this is only if you have not found that he has a good reason for not wanting to go to school)
Sit him down and tell him, "I am sorry, but since you do not want to go to school any more, I cannot buy you any more special treats. There is a special deal between parents and children. The children go to school, and they are given treats by parents. From now on, you will have to earn your treats." Come up with a reward system. For example, each day that he goes to school he gets 5 points. If he goes without fussing, he gets an extra 5 points. When he gets reports from his teachers, reward him for doing well.
Do not give in to the temptation to give him treats if he does not earn them. It will also be difficult to get your mother to not "sneak" him rewards; maybe you can get her help in coming up with things which will earn him rewards, or which he can spend his rewards on. This will make her a partner with your intentions, rather than an obstacle.
I think it is better not to offer him rewards in terms of money, that way you can adjust his rewards to make things that are fun but good for him (healthy treats, fun things that don't cost a lot of money) less expensive than things which he likes but which are not good (candy, expensive toys that he doesn't need). For example, when my son asked for an apple in the store, I "charged" him one point, but a candy bar was fifteen points, even though both cost the same.
You may feel angry at the thought that you must "pay" him for things which he should be doing without reward, and I completely understand (I felt the same way at first, with my son) but anger is not productive and is quite harmful in any relationship. The thing you must ask yourself is "what is important"? If it is important to you that your son's behavior gets better, then please try this. It worked very well for me and is unlikely to cause harm.