Bug #100945
closedvendor/bin/setup fails if port is not passed as option and host is "localhost"
100%
Description
Port has a default of 3306, so this shouldn't fail.
Reproduce¶
on DB (with existing user "typo3"):
mysql> create database t3intro12 CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> grant all on t3intro12.* to `typo3`@`localhost`;
composer create-project typo3/cms-base-distribution:^12 t3intro12
cd t3intro12
./vendor/bin/typo3 setup --driver=mysqli --host=localhost --dbname=t3intro12 --username=typo3 --password='a34234Sfb8GHf!' --project-name=t3intro12 --force -n
For TYPO3 13, it needs some additional parameters, e.g.
vendor/bin/typo3 setup --driver=mysqli --host=localhost --dbname=t3intro13 --username=typo3 --password='mypasswd...' --project-name=t3intro13 --force -n --admin-username=system --admin-user-password='mypasswd' --admin-email="myemail@mydomain"
Result¶
In SetupCommand.php line 428: Please use a port in the range between 1 and 65535.
Expected result¶
Port is default 3306, so port is set correctly and this should not fail, see
./vendor/bin/typo3 setup -h
Versions¶
- reproduced with TYPO3 12 base distribution
- reproduced with TYPO3 13 base distribution
Workaround¶
Pass the port explicitly, e.g.
./vendor/bin/typo3 setup --driver=mysqli --host=localhost --dbname=t3intro12 --username=typo3 --password='a34234Sfb8GHf!' --project-name=t3intro12 --force -n --port=3306
Updated by Benni Mack almost 2 years ago
- Sprint Focus set to Stabilization Sprint
Updated by Johannes Nielsen almost 2 years ago
host, dbname and username also have default values. Would it make sense to make those optional, too?
Updated by Sybille Peters almost 2 years ago
host, dbname and username also have default values. Would it make sense to make those optional, too?
It depends if the default values actually make sense and you would use them in most cases.
- host: default is "db".
- dbname: default is "db"
- username: default is "db"
I don't think the defaults "db" are good defaults here but that is just my opinion. I would not make them optional.
Updated by Gerrit Code Review almost 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257
Updated by Johannes Nielsen almost 2 years ago
Sybille Peters wrote in #note-4:
host, dbname and username also have default values. Would it make sense to make those optional, too?
It depends if the default values actually make sense and you would use them in most cases.
- host: default is "db".
- dbname: default is "db"
- username: default is "db"
I don't think the defaults "db" are good defaults here but that is just my opinion. I would not make them optional.
Those are the default values which ddev uses. I agree that whether these make sense depends heavily on the individual project/setup and that it probably does not make sense to make them optional.
Updated by Gerrit Code Review almost 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257
Updated by Gerrit Code Review almost 2 years ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257
Updated by Gerrit Code Review almost 2 years ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257
Updated by Gerrit Code Review almost 2 years ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79257
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79831
Updated by Anonymous over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1ccaef4f16b55a5ada0fd14905ad4f19320477d5.