Another day, another vagrant-libvirt setup.
This time for MariaDB, with a server VM and a client VM. As usual, vagrant, libvirt and Ansible do the heavy lifting.
https://codeberg.org/johanneskastl/mariadb_vagrant_libvirt_ansible
https://github.com/johanneskastl/mariadb_vagrant_libvirt_ansible
Have a lot of fun...
@johanneskastl Hi there, just randomly came across this post! Is it intentional that it's failing when connecting with the root user? If not, I'm sure there are ways of fixing it. Does it work if you SSH into the server VM and connect from there?
@dbdemon Yes, as stated in the mariadb_snippet.txt and the Ansible output, the root user is not allowed (for good reasons...) to connect via the network. Only the example-user is intended and able to connect.
Did the phrasing not make this clear? Feel free to suggest a better wording for this...
@johanneskastl I was looking mostly at the README.md. Not really important, but my opinion would be instead of "the root user will be denied" maybe simply "the root user can only connect from localhost". You could also add it's for security reasons.
But I was also thinking, in a small development environment you might actually in some cases want to be able to connect as root e.g. from your host machine just for convenience reasons. Maybe there should be an option for that?
BTW, I see you're installing `python311-PyMySQL` on the mariadb-server VM. Wouldn't this make more sense on the mariadb-client VM? (Also, are you aware there is now also a `mariadb` Python package? https://pypi.org/project/mariadb/ But I have no idea how to install this with Ansible/Vagrant, and whatever works, of course!)
BTW 2, I don't see any adjustment of the perhaps most important MariaDB and MySQL system variable, innodb_buffer_pool_size. Assuming the mariadb-server VM is going to be running MariaDB server only, and the VM has 2048 MB, then you could set this to e.g. 80% of that (1638 MB) which is often the recommendation.
Sorry for this lengthy rambling, I guess I'm on some kind of crusade! Thank you for your efforts, it's always great to see this kind of relational database project that developers can use to get up and running quickly.
@dbdemon Thanks for your feedback, I added a note on that to the README.