Changing the Default SQL port for RadioDJ:

When it comes to a SQL server running along side RadioDJ some users have found that their webhosts won’t allow connections to the default SQL port 3306.

If you need a specific port open for this to work it’s probably a wise idea to email your website host support department asking if it’s OK to use a non standard port for use with SQL. Otherwise you may get into trouble with them.

If your webhost doesn’t allow MySQL connections on a standard 3306 port then you need to get creative by changing the default SQL port in the SQL server program

We’ve gone with MariaDB.

It’s not as scary as it sounds. Honestly it shouldn’t take too much to sort it.

1) Backup your RadioDJ database using the database setup tool. (Just a precaution)

2) Locate your my.ini file which can be found in C:\Program files\MariaDB\ open it with Wordpad or Notepad++

Stop the mysqld.exe service. Control Panel>All Control Panel Items>Administrative Tools>Services> Look for the MySQL service.

3) Now the service has stopped you can move onto changing the port number in the my.ini file to the port you want to use.

Important: You change MySQL ports at your own risk. We cannot be held responsible for anything that goes wrong while configuring things.


[mysqld]
datadir=C:/Program Files/MariaDB 10.1/data
port=3306
sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
default_storage_engine=innodb
innodb_buffer_pool_size=1008M
innodb_log_file_size=50M
character-set-server=utf8
[client]
port=3306

TIP: You will also need to make sure the port you want to use is open on your broadband router as well as your website/webhosts firewall

 
4) Click save in the editor and restart the SQL service from the services menu.

If the server has restarted then you should be good to go on that new port. Make sure you’ve allowed it in Windows Firewall.

5) If you then open the databasesetup.exe within RadioDJ and enter your server details for the server like this.

Click to enlarge

The most important bit is to have the server IP like this (e.g: 127.0.0.1:3307)

(3307 is just an example of a non standard port)

6) Click on Validate and if you’ve got the SQL connection details correct you should see your SQL server online like the above picture.

Start RadioDJ and check everything is restored.

7) If your data is intact then you need to do nothing. If it has gone wrong restore the RadioDJ backup that you made at the beginning of the tutorial.

Now we move onto changing the details in the configuration files of the RadioDJ Demo script

You need to edit the serv_inc.php file to look like this.

Click to enlarge

Where its says YourIP you need to put in your External IP address.

Next to that you need the port number so it would look something like this: 145.238.23.54:3307

Then just enter the rest of the connection details and if all goes to plan the demo web script should be working on your website.

If your website host still won’t allow you to have certain ports open for requests. Then it’s time to find a website host who does or rent your own VPS.

Last updated on: May 24th, 2017
at 15:36 PM Europe/London

Translate »