Private Bases (mines) - Bought by the State with State funds. Upgrades are paid using Private funds that go to the State.
I think that PsyKoSnake and DeadlyShoe addressed this, but just to make certain that it's clear to everyone: the state does not pay a single cent towards the construction of mining and gas mining stations. The private sector pays the construction costs.
In fact, the state's cash on hand actually increases by the cost of the mining or gas mining station every time one of your construction ships begins construction on such a station; as far as I can tell, there is no cost at all to the state at any point in the construction process (starting from ordering the mine all the way to when the mine is finished) beyond the maintenance cost of the construction ship. I also agree with Evan85 that 'free' is a bit misleading, as the private sector does require some amount of cashflow (absorbed by freighter, gas mining station, and mining station maintenance) and cash on hand (used to purchase freighters, mining stations, gas mining stations, and fuel to power the freighters and stations, as well as by resource purchases every time a freighter moves resources from one point to another). Of course, in general the private sector will have significant amounts of money, but you can drive it to bankruptcy through the various tricks that players can use to extract funds from the private sector, by overburdening the private sector with maintenance costs for e.g. size-1500 superfortified mining stations, and by incautious use of smuggling missions, especially if these are combined with high tax rates on most worlds since the private sector's income is whatever colony revenue isn't absorbed by taxes or corruption.