A key question in flow control is that of the design of optimal controllers when the control space is high-dimensional and the experimental or computational budget is limited. We address this formidable challenge using a particular flavor of machine learning and present the first application of Bayesian optimization to the design of open-loop controllers for fluid flows. We consider a range of acquisition functions, including the recently introduced output-informed criteria of Blanchard and Sapsis (2021), and evaluate performance of the Bayesian algorithm in two iconic configurations for active flow control: computationally, with drag reduction in the fluidic pinball; and experimentally, with mixing enhancement in a turbulent jet. For these flows, we find that Bayesian optimization identifies optimal controllers at a fraction of the cost of other optimization strategies considered in previous studies. Bayesian optimization also provides, as a by-product of the optimization, a surrogate model for the latent cost function, which can be leveraged to paint a complete picture of the control landscape. The proposed methodology can be used to design open-loop controllers