Inspired me to do a bit of research. Honolulu was a bigger place in 1940 than I expected; it had 200,000 people in the city and county. Only doubled since then, I really had expected more.
Used Google Earth to check some ranges: About eight miles from the center of Honolulu to Battleship Row, and four miles to Hickam.
The pilots of the Imperial Japanese Navy in 1941 were probably trained as well as any in the world, and the Japanese had good Intelligence. One of the recent retrospectives said that the Japanese expected extremely heavy defenses, and the pilots were doubtful of making it back. With that, it's very unlikely that any of the pilots would have made an eight...or even four....mile error in targeting. Honolulu was not really at risk.
The Naval and Army bases were legitimate targets. I'm guessing the hospitals, etc. didn't have large, visible red crosses at this stage of the war. Still, doubt IJN pilots would have shot up random buildings while there were still targets on the surface in Pearl Harbor. Of course, accidents (and, friendly fire, as Bill said) happens.
No doubt civilian facilities just outside the bases might have taken a few "overs" as well. But the kind of facilities just outside the base perimeters were often the kind that the good church-going citizens of Hawaii woudn't have minded taking a few 20 mm shells.
Interesting trivial point: The Imperial Japanese Navy had a strong British heritage, with their early ships bought from Great Britain and many of the officers trained there. IJN ships even used English for helm commands until about 1930.
Ron "Funny in-name jokes copyrighted 2016 all right reserved*" Wanttaja
* Actually, no. It's been an Internet tradition going back about 30 years....just old guys like me and the other Ron remember....