Somnathapura (alternative spelling: Somanathapura or Somnathpur) is a city in Karnataka.
Somanathapura is 30 Km from Mysore.
There is no direct bus from Mysore to Somanathapura, the best is to take a bus from Mysore to T.Narasipura and then another bus to Somanathapura.
There are plenty of taxi at T.Narasipura opposite to bus stand. It will cost you around Rs. 250 to hire a taxi for a round trip to the temple.
Food and water has to be carried since there are not very good restaurants