The problem of locating hub facilities and allocating non-hub nodes to those hubs arises frequently in the design of communication networks, airline passenger flow and parcel delivery networks. In this paper we consider uncapacitated multiple and single allocation p-hub median problems. We develop new mixed 0/1 linear formulations with tight linear programming relaxations. The approach is tested on a well known and heavily used benchmark data set of real-world problems with resulting LP relaxations ranging from 10 010 to 391 250 variables and from 2101 to 31 901 constraints, which proved to be difficult linear programs. Yet, this approach proved to be very effective: in almost all instances the linear programming solution was integer. In cases with fractional solutions, the integrality was achieved by adding a small partial set of integrality constraints. Therefore, we extended the range of optimally solvable instances of these NP-hard hub location problems, which have defied researchers for the last ten years. As an additional result for the single allocation case we were able to establish optimality of all heuristic solutions obtained via tabu search algorithm from a previous study. For the more difficult single allocation p-hub median problem we also used the best known heuristic solution as a guidance in adding integrality constraints. This novel linkage between optimal and heuristic solutions has a potential impact in a number of other problem settings, where efficient heuristic solutions exist and are probably, but not provably optimal.