6

I have MySQL server running on a different port than the default one.

Suppose, the default port for MySQL is 3306. I have another MySQL server running on port 5625. I want to install Magento2 using MySQL database from port 5625.

While installing Magento2, I can only specify hostname, username, password and database name.

How can I specify port number as well at the time of installation?

3

If you use the CLI, you can append the port to the --db-host flag. You can probably do the same thing in the Setup Wizard.

IOW, --db-host=localhost:5625

1

If you're using docker; make sure to not use localhost as given. - Use the container name such as 'mysql'. - So when you're in the setup just give it your container name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.