Description
I had the chance to sit with a new Dolt customer recently and the behavior around the root
user changing based on what you specify or don't specify when you start a sql-server and whether or not you create any additional users is a sharp edge that confused the customer and made them think there was something buggy about Dolt.
This behavior is very easy to trigger with common usage patterns. Users just start a sql-server with the default options:
❯ mkdir new-dir && cd new-dir
❯ dolt sql-server
Then they connect and start creating users for their application:
❯ mysql -uroot --protocol TCP
CREATE USER 'myapp'@'%' IDENTIFIED BY 'password';
The next time they need to restart their sql-server, the root
account will have mysteriously disappeared:
❯ mysql -uroot --protocol TCP
ERROR 1045 (28000): User not found 'root'
In the customer interaction I saw, we needed to ask them to restart the sql-server to turn up the loglevel, but the sql-server could need to be restarted for many reasons of course. It might even be weeks later when the user needs to restart the server and it would be even more mysterious why that root
account suddenly stopped existing.
Dolt should match MySQL's behavior with the default admin user to make this less confusing/surprising for customers. MySQL has a default root
admin user that users can delete or change as necessary, but MySQL never removes that user because customers created other users. Dolt should create the default root
admin user account, and not delete it unless a customer explicitly deletes it.
Activity