It's not a good idea to use glue directly on the flesh of the mushroom. They are pretty hardy, so it may be fine. The best way is to find a place in your tank with low flow and rest the mushroom on some loose rubble rock. You can put the rubble rock in a shallow glass/container to make sure the mushroom doesn't float away. You can also you plastic mesh/bridal vail to hold the shroom in place. It can attach in as little as one day or may take more then a week.
Once it has attached to the rubble rock, you can then move it where you like and glue the rubble rock in place.
Keep in mind, that it is alive and can move, and can unattach itself if it doesn't like where you place it. So if it's final position is in bright light and high flow, you should start in a low lighted area with low flow and gradually move up.