Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the copy-the-code domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
How to Change MongoDB Default Port in 🐧 Ubuntu/CentOS/Windows - PC✗3
How to Change MongoDB Default Port in 🐧 Ubuntu/CentOS/Windows

How to Change MongoDB Default Port in 🐧 Ubuntu/CentOS/Windows

Summary:

The default port that MongoDB runs on is 27017 and to change it we have to edit MongoDB’s main configuration file, which for Linux Ubuntu/CentOS is mongod.conf and for Windows its mongod.cfg.

The default port that MongoDB runs on is 27017 and to change it we have to edit MongoDB’s main configuration file, which for Linux Ubuntu/CentOS is mongod.conf and for Windows its mongod.cfg.

So open the file with your favorite editor and locate the line that says:

port: 27017

And change the value to your new port number:

port: 25000

Then you have to restart the mongod service:

systemctl restart mongod.service

or

service mongodb restart

In CentOS you also need to configure Selinux to allow new port:

semanage port -a -t mongod_port_t -p tcp 25000

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.