DB/SQL Commands - Compatibility with MySQL on alternate port
Closed this issue · 0 comments
totten commented
Steps to reproduce
- Install PHP and MySQL
- Ensure MySQL runs on an alternate port (not
3306
; perhaps3307
or3333
) - Install Backdrop, eg
./core/scripts/install.sh --db-url="mysql://myuser:mypass@127.0.0.1:3307/mydb" ...
- Run commands like
bee users
andbee sql
Expected Results
bee users
-- Show list of usersbee sql
-- Open MySQL console
Actual Results
-
🟢
bee users
-- Show list of users| User ID | Username | Email | Roles | Last Login | Status | | 1 | admin | admin@example.com | administrator | 01/08/2024 - 7:10pm | Active |
-
🔴
bee sql
-- Failure:ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Comments
So this is not a general framework problem. (The DB URL already supports port numbers.) It's just a problem the sql
command -- where it transmits the DSN to MySQL CLI. The process relies on a stub file (my.cnf
format) which is missing connection details.