StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.74k stars 1.75k forks source link

Starrocks all-in-one docker should permit password changes #23429

Closed alanpaulkwan closed 12 months ago

alanpaulkwan commented 1 year ago

Enhancement

docker run -p 9030:9030 -p 8030:8030 -p 8040:8040 -itd --name=starrocks -v starrocks-storage-be:/data/deploy/starrocks/be/storage -v starrocks-storage-fe:/data/deploy/starrocks/fe/meta  [registry.starrocks.io/starrocks/allin1-ubuntu](http://registry.starrocks.io/starrocks/allin1-ubuntu)

mysql -uroot --port=9030 --password=

mysql> set password for root=password('lolwhydoesthiscrash')

crash

While I can just use docker-compose.yml would be nice to fix this.

alberttwong commented 1 year ago

Still happens. Crashed on change. Restarted the container and then I was able to use the new password.

atwong@Alberts-MBP-3 ~ % mysql -P9030 -h127.0.0.1 -uroot --prompt="StarRocks > "
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.0 3.1.0-rc01-64ca37e863

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

StarRocks > set password for root=password('lolwhydoesthiscrash')
    -> ;
Query OK, 0 rows affected (0.02 sec)

StarRocks > exit
Bye
atwong@Alberts-MBP-3 ~ % mysql -P9030 -h127.0.0.1 -uroot --prompt="StarRocks > "

ERROR 1064 (HY000): Access denied for user 'root' (using password: NO)
atwong@Alberts-MBP-3 ~ % mysql -P9030 -h127.0.0.1 -uroot -plolwhydoesthiscrash --prompt="StarRocks > "
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:9030' (61)
atwong@Alberts-MBP-3 ~ % mysql -P9030 -h127.0.0.1 -uroot -plolwhydoesthiscrash --prompt="StarRocks > "
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:9030' (61)
atwong@Alberts-MBP-3 ~ % mysql -P9030 -h127.0.0.1 -uroot -plolwhydoesthiscrash --prompt="StarRocks > "
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 0
Server version: 5.1.0 3.1.0-rc01-64ca37e863

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

StarRocks > exit
alberttwong commented 1 year ago

Per @kevincai not fixed yet. a workaround is when the password is changed, start the docker with -e MYSQL_PASSWD=<your_password>

kevincai commented 1 year ago

this is fixed in our 3.1.0 release, if your password changed, the docker log will prompt with error mysql password, and ask to restart the container with -e MYSQL_PASSWD=<your_password> error message.