How to run Apache and Mysql on different port Jun 25, 2020 Default ports are 80 for apache and 3306 for mysql. How to run Apache on different port 8079 /etc/apache2/ports.conf Listen 8079 /etc/apache2/sites-enabled/000-default.conf <VirtualHost *: 8079> sudo service apache2 restart How to run Mysql on different port 3308 /etc/mysql/mysql.conf.d/mysqld.cnf port = 3308 sudo service mysql restart