Change port for sshd and mysqld?

The default installed mysql and ssh do not respect the port settings in their config files (/etc/my.cnf and /etc/sshd_config) respectively. For firewall reasons we have to run these on different ports.
It is not clear where both the services get their port settings from. I found a hint that sshd actually gets it from the /etc/services file:
http://www.macosxhints.com/article.php?story=20050707140439980
I haven't yet tried that, but it seems possible, any experiences?
Mysqld sets the port on the commandline that runs the server, I found the setting in the /System/Library/LaunchDaemons/org.mysql.mysqld.plist file. I removed that setting (so that it respects the my.cnf setting) but unfortunately Server Admin seems to write over that file when it restarts the MySQL server. Does anyone know where Server Admin gets that setting from?
I guess I should add a note that says I'm annoyed that this is hard, but really I just want to get it working
--J

Thanks, yes, I can confirm that editing /etc/services for sshd worked, now I have sshd listening on 22 and another chosen port.
Mysqld is still tricky. A temporary workaround is:
$sudo launchtl unload /System/Library/LaunchDaemons/org.mysql.mysqld.plist
then edit that file, removing the --port=3306 argument then load it again. When that line isn't there it does respect the settings in my.cnf. I'm pretty sure that this persists across reboots, too.
However if you stop and start MySQL with Server Admin.app that file is re-written, including the port line that you deleted. So you either have to do the above again, or remember to restart mysqld (hopefully doesn't happen often) by using launchtl unload or service mysqld stop. I'd love to get this working through the GUI.
--J

Similar Messages

  • After change port for TCPIP PORT for default SQL Server instance (MSSQLSERVER), sql service and sql agent service did not started again

    Hi 
    -when i install default instance MSSQLSERVER i added a domain account as a service account,
    - when i change port for TCPIP PORT , and after sql service and sql agent service did not started again.
    it thrown error 
    The SQL Server (MSSQLSERVER) service failed to start due to the following error: 
    The service did not start due to a logon failure.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
        <EventID Qualifiers="49152">7000</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
    but when i add domain\sqservice account in administrators group these services started,
    1) here  why this change behavior  happened
    2i changed the port 1500
    adil

    HI
    the sql instance service is running with domain/sqlservice account , 
    - i stopped the sql service service
    - when i start it not started again and i found below error message
    Domain and account: MOJPORTAL\spsqlservice
    This service account does not have the required user right "Log on as a service."
    User Action
    Assign "Log on as a service" to the service account on this computer. You can use Local Security Settings (Secpol.msc) to do this.
     If this computer is a node in a cluster, check that this user right is assigned to the Cluster service account on all nodes in the cluster.
    If you have already assigned this user right to the service account, and the user right appears to be removed, 
    check with your domain administrator to find out if a Group Policy object associated with this node might be removing the right.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
        <EventID Qualifiers="49152">7041</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8080000000000000</Keywords>
        <TimeCreated SystemTime="2015-04-24T17:12:58.326973300Z" />
        <EventRecordID>2177</EventRecordID>
        <Correlation />
        <Execution ProcessID="520" ThreadID="4044" />
        <Channel>System</Channel>
        <Computer>PORTALSQL1.mojportal.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data Name="param1">MSSQL$xSQL</Data>
        <Data Name="param2">xxxL\spsqlservice</Data>
      </EventData>
    </Event>
    adil

  • I woke up this morning and my Bookmarks is working different.  Has a setting changed, or did Apple change it for me and how do I get it back?????????

    I woke up this morning and my bookmarks are functioning different, and the tool bar has changed.  Instead of opening the bookmarks in a page on Safari, I get a menu on the side of the page.  Then I have to go click on the bookmark icon again to get rid of the menu.  Has a setting changed or did Apple change it for me and how do I get it BAAAAAAACK????????????

    The first G4 models were basically a repackaged/upgraded G3 & came in 350 & 400MHz models. This design was called PCI version. The next G4 models were AGPs. This link http://www.everymac.com/systems/apple/powermac_g4/index-powermac-g4.html has the specs/pictures of all the G4 models.
    Power Mac G4: How to Differentiate Between Models
    http://docs.info.apple.com/article.html?artnum=58418
    Power Mac G4: How to Differentiate Between Models (Part 2)
    http://docs.info.apple.com/article.html?artnum=42739
    Using these links, you should be able to determine which model you have.
    Removing the battery causes all settings in the internal memory to be reset, just like resetting the PMU/CUDA. See Mac PRAM, NVRAM, CUDA/PMU & Battery Tutorial
     Cheers, Tom

  • How do I change platform for downloading and installing Photoshop Elements from Windows to Mac?

    How do I change platform for downloading and installing Photoshop Elements from Windows to Mac?

    As long as your license supports both platforms you should only have to download the Mac version and install/activate using your serial number.  If you need help finding a link to download the file, please indicate the PSE version you need.

  • Change pointers for QPMK and QSMT

    QPMK     Replication of QM master inspection characteristics (ALE)
    QSMT     Replication of QM inspection methods
    I activate change pointers for QPMK and QSMT using BD50.
    I want to enter change document items for QPMK and QSMT using BD52.
    How do I find the document items for these message types to enter in BD52?
    Can these message types use change pointers?

    Please respond anyone

  • How to configure Mail to use different ports for POP and SMTP?

    I am trying to configure Mail for my AT&T account. It requires me to configure POP (incoming) mail for port 995, and SMTP (outgoing) mail for port 465. However there doesn't seem to be an option to configure different ports for these. Is that correct, or am I missing something?
    Alternatively can I configure two accounts, one for POP incoming and one for SMTP outgoing? My incoming POP account does work, but in configuring an outgoing account I still have to configure a POP server name and that will not work for the outgoing port.
    Any advice on how to solve this would be appreciated.

    Understand. It is really quite easy to do in Mail, too. Kappy told you how to set up the smtp piece. I gave you pop info. These two things are on different panels within Account Preferences.
    To recap his and my posts
    SMTP:
    In Mail Prefs, click on the accounts icon. Click on your att yahoo account on the list. On the right of the window, in the lower portion, you see an smtp server menu. Open it and select edit. Select Edit Server, then click on its Advanced tab. Set up port 465 with SSL.
    POP:
    This is on a different panel in Mail PRefs Accounts. Now in Mail Prefs, click on the accounts icon. Click on your att yahoo account on the list. On the right of the window, you see three tabs, acc't info, mbox behaviors, and Advanced. This is where things are different than for smtp. You are going to configure stuff on a different "advanced" panel than where you were for the smtp stuff. Click on the advanced tab. There is a field for port with a SSL checkbox next to it and an authentication drop down menu. Check the box and it should quickfill change from 110 to 995. Autentication drop down is probably already default to password.
    Did you visit the URL I gave you previously? It even gives you screen shots.

  • Possible to have different ports for incoming and outgoing email?

    I need to set up a mail account in Mail where I read incoming mail from port 110, but to send outgoing mail I need to use port 587. Is this possible in Mail? Looks as if you only get to set the port once for both operations.

    it is indeed possible. go to mail>preferences>accounts, select the account you already created then go to account information and to outgoing server list, click on the list, go to edit server list and in the advanced pane you can change the outgoing port. for the incoming port, again select the account you already created, then go to advanced, and type in the incoming port.
    hope this helps

  • Changing port for OAM proxy

    Hi all
    I need to change the port for the OAM proxy which is 5575 because this port is already in use for a different application , how can I do that ?
    Is this change going to break the access gate for OIM , I have OIM OAM integration scenario
    Thanks

    If i understand you right then .....i guess what you need is to have console on a differnt port than the http listen port ....for this you can use Administartion port.....in your console go to the domain tab and in that Enable Administaration port and then you can use this port for the administrative traffic.....so the new url for consle will be t3s://ipaddress:adminport/console..please test this in a test enviornment first......
    The other thing you were telling about is to change the context root for the console application ...you can do this in the same domain tab under configuration ...in the advanced tab you would see Console Context Path...just modify (sayfor eg: MyConsole) this and then you can use that value to bring up your console...http:ipaddress:port/MyConsole.....
    Both the above changes needs a restart of admin server......
    try in a test enviornment first.....
    Hope this answers your question .....
    Let us know if this works.......

  • Changing port for console?

    Hi,
    is it possible to change WLS port for console application only on a standalone wls server?

    If i understand you right then .....i guess what you need is to have console on a differnt port than the http listen port ....for this you can use Administartion port.....in your console go to the domain tab and in that Enable Administaration port and then you can use this port for the administrative traffic.....so the new url for consle will be t3s://ipaddress:adminport/console..please test this in a test enviornment first......
    The other thing you were telling about is to change the context root for the console application ...you can do this in the same domain tab under configuration ...in the advanced tab you would see Console Context Path...just modify (sayfor eg: MyConsole) this and then you can use that value to bring up your console...http:ipaddress:port/MyConsole.....
    Both the above changes needs a restart of admin server......
    try in a test enviornment first.....
    Hope this answers your question .....
    Let us know if this works.......

  • How do u change ports for Listeners

    Hi,
    If I want to change port number for my listener, Do I just edit the listener.ora? Or first, I have to activate the port assigned, at the OS side? Or no need of port activation?
    Thanks

    Hi,
    Just edit/modify the port and restart the listener. Yes, prior to check any thing is blocking the port on the Sever level or not.
    - Pavan Kumar N

  • Changing ports for web server

    Hey everyone,
    I have a small problem: changing the port for the default site.
    I know how it's done for custom sites (though I haven't yet figured out how to reach those via the browser).
    For the default site however its set to 443 and i cannot change that - I also haven't found any entry in the httpd.conf that relates to the secure port.
    Is there a way to switch between http and https?
    Thanks a lot,
    Chris

    Gulfstar37 wrote:
    Thanks for the very prompt reply, kevj!  I followed the instructions exactly.  However, on the Tools dropdown menu, I clicked on Options....but there is/was no Ports listed (all the usual icons: Getting Started, Checking Mail, Incoming Mail, Sending Mail, Composing Mail, Internet Dialup, etc.  BUT no incon for Ports!  I went through clicking on every icon, checking thoroughly every possibility...buttons, etc...and can find nowhere anything where a Port is shown, or anything where it might be changed.  I don't know how long it will be before Comcast closes Port 25, and really desperate about this.
    OK...I just downloaded and installed Eudora so I could figure this out...and it turns out to be rather easy...
    To set up encryption for RECEIVED mail (not required by Comcast, but recommended):
    Under Tools...Options, look at the 'Checking Mail' item. Set up the 'Secure Sockets when Receiving' option like this:
    Once you receive mail using this setting, if you come back to this option screen and click on 'Last SSL Info' it will show that you connected over port 995.
    To set up encryption for SENDING mail (this is required by Comcast):
    Under Tools...Options, look at the 'Sending Mail' item. Set up the 'Secure Sockets when Sendin' option like this:
    Again, once you set this up and send an email successfully, if you come back to this option screen and click on 'Last SSL Info' it will show that you connected over port 465.
    Let us know if this works...it did for me...

  • Change Ports for BranchCache Distributed Mode

    Hi!
    I know you can change the ports being used for BranchCache Hosted mode. Is it possible to change the ports for BranchCache distributed mode as well? Since some of my clients who need to use BranchCache are providing a webserver on port 80.
    Thanks for your support!

    Oi, of course you can change the port of BranchCache Senior!
    Set ConnectPort and ListenPort in reg as part of these instructions:
    https://technet.microsoft.com/en-us/library/dd837646(v=ws.10).aspx
     Then BranchCache service fails to start, but if you look in the event log you see:
    The BranchCache service cannot start because the HTTP namespace used for serving content to requesting clients is not reserved.
    Run the enable cmdlet appropriate to your service mode from an elevated PowerShell command prompt.
    So to reserve this space, run the following command:
    netsh branchcache>set service mode=distributed
    Which then outputs the following, underlined, bolded and Italic so that Phil can see it:
    Configuring URL Reservation url=http://+:1365/116B50EB-ECE2-41ac-8429-9F9E963361B7/, sddl=D:A;;GX;;;NS) ... Succeeded
    Enabling firewall rule group BranchCache - Content Retrieval (Uses HTTP)... Succ
    eeded
    Setting Service Start Type to Manual... Succeeded
    Setting Service Mode... Succeeded
    Starting Service... Succeeded

  • How to change Port for SAP Client on SAP R/3 Server?

    The defualt port for SAP GUI Client is 3200.
    How could I change the SAP GUI Client port to say 5222 instead of 3200?
    How can I view the full list of all ports required by SAP R/3?

    Freddy,
    I don't have the document handy but there was a document on service.sap.com/security which would give you a list of all the ports. SAP's wording is some thing like "specific ports are fixed and SAP does not support changing that port number".
    In case of GUI client and your example of 3200, as you know 00 is based on the fact that that is your instance number. You could change last two numbers by assigning a different instance number (and not 00).
    Thanks
    BMG

  • SJAS not respond when Change port for Derby db

    Hi Folks
    when I change port from 1527 [because it is used by another protocol] for derby database to 3333 [using derby.drda.portNumber=3333 in /root/.netbeans-derby/derby.property file] I found that SUN APPLICATION server is not responding properly.
    NOT responding properly means:
    1. I can start it from command line but can't start from Netbeans(exceptions of derby etc)
    2. I can not see any page o/p in browser for admin and webserver8080 but ports are used by SUNApplication server (confirm by port scanning)
    anyone faced same problem please tell us possible reasons

    Hi,
    I did the same thing as you have done - changed the port number to 3333, without making any changes manually to the port values for derby in netbeans. After this i started the appserver from netbeans and i was not only able to start derby (in port 3333) but also the application server successfully. I did not get any exceptions whatsoever.
    Just curious, which version of app server are you using? Also, did you verify the settings for the application server that you are starting (using netbeans) under Tools->ServerManager ?
    I tried this with 9.1UR1 b01. To add to this, i was able to access the admin console and also the 8080 port.
    Edited by: mchondria on Oct 9, 2007 5:22 PM
    Edited by: mchondria on Oct 9, 2007 5:23 PM

  • Problems opening ports for PS3 and XBOX 360 on WRT160N

    i opened all the ports for both system but one system will be lagging while the other will be fast on connection im trying to make both system run on a fast connect is there a step im missing

    Which ports you have opened for x-box and ps3..?
    Have you done port forwarding or port trigerring..?
    Is ps3 and x-box are connected wired or wireless...?
    Reduce the MTU sixe to 1364 on the router.Uncheck"Filter Anonymous Internet Requests". Under Wireless tab,click on Advance Wireless Settings tab and Change the Beacon Interval to 75,Fragmentation Threshold to 2304,RTS Threshold to 2304 and Click on Save Settings...
    Now,power cycle the entire network and then,try........

Maybe you are looking for

  • Dual monitor setup without Xinerama or TwinView

    I've searched the forum looking for anyone who is using a dual display setup without using Xinerama or TwinView.  There are plenty of discussions to the contrary, but I running one window manager (DWM) on my primary monitor and anything else on the s

  • Set a timer in servlet

    i want to set a timer of 10 min in one of my pages(im using servlets) and i want to redirect a user to a different page after that period of time.i tried to use a loop using thread.sleep(),but it is not working.to redirect to a different page i uused

  • GPS metadata settings on preset LR 5.7

    I have the 5D MKIII and just acquired the GP-E2, after taking some sample pictures the GPS info does not show in GPS part of metadata.  In reading the forum and other sources, I may be missing something in setting up the preset, based on hints that i

  • Why is my photo steam not working??

    My photo steam does not seem to be working. When i take a photo on my phone only some of them are going into the photo steam album on my phone but none are going over to my computer. i have a 4s Can anybody help please.

  • How do i fix my Iphone5 camera

    How do you fix a problem with an IPhone5 camera?  The shutter remains closed