Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: How to install SugarCRM 5.0 on MySQL with non-standard port?

  1. #1
    bbergmann is offline Member
    Join Date
    Apr 2008
    Posts
    8

    Question How to install SugarCRM 5.0 on MySQL with non-standard port?

    Hello forum,

    i was very successful installing SugarCRM 4.5.1 on a linux server with mysql on non-standard ports (NOT 3306) using configurations like e.g. "127.0.0.1:3321" for the database host.

    BUT, when i was trying the same thing for SugarCRM 5.0.0, the installation could not complete because no connection to the database server could be established.

    So, now here is my question: is it generally possible to install SugarCRM on a database with another port than 3306? And if, how?

    Thank you very much for your support.

    Best regards,
    Benny

  2. #2
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    213

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    PHP Code:
    db_host_name='localhost:12345' 
    Should do the trick?

  3. #3
    bbergmann is offline Member
    Join Date
    Apr 2008
    Posts
    8

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    Hello madmat,

    thanks for your reply. But sorry, this does not work

    If i install Sugar 5 on the standard mysql port everything works fine.
    But if i now copy the database from the standard port server to the mysql server with non-standard port and change the line above in config.php to the non-standard port ('127.0.0.1:1234'), i get the following error:

    Code:
    Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2005): Unknown MySQL server host '127.0.0.1:1234'
    Other applications work very well on these settings...

    But that is not really my problem. I am looking for a way to install sugar CRM 5.0 to a non-standard mysql port by default.

    But if i try to set up the database host / port ('127.0.0.1:1234') in the installation dialogue of SugarCRM, i only get similar error messages.

    Any ideas?

  4. #4
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,992

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    Hi,

    Check out this one - looks like a solution: http://www.sugarcrm.com/forums/showt...ght=mysql+port

    rgds
    rl
    __________________________
    Robert Laussegger
    iscon group

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch 2013 gibt es hier: Deutsche Sprachdateien SugarCRM
    JetMobile lite für Sugar jetzt gratis herunterladen

  5. #5
    bbergmann is offline Member
    Join Date
    Apr 2008
    Posts
    8

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    Hello roblaus,
    thanks for replying.

    but as mentioned before: manipulating the config.php does not work for SugarCRM 5.0.0!
    With SugarCRM 4.5.1 this works perfect, i can use the installation wizard with database hosts like '127.0.0.1:1234' but NOT with SugarCRM 5.0.0!

    regards,
    Benny

  6. #6
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,992

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    But implementing is then up to you...

    the last post in this thread says (I did not try it):

    I had the same problem, needed to run sugar using a mysql server listening on port 3307. Using the community php install script, there was no option to specify a mysql port during install and plugging in localhost:3307 for host did not work.

    I added the following to install.php and include/entryPoint.php. Install went smooth, everything looks good. I'll repost if I have any trouble. Seems to work.

    ini_set('mysqli.default_socket', '/tmp/mysql5.sock');

    You need to change '/tmp/mysql5.sock' to whatever info your server jocks give you for the socket.

    rgds
    rl
    __________________________
    Robert Laussegger
    iscon group

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch 2013 gibt es hier: Deutsche Sprachdateien SugarCRM
    JetMobile lite für Sugar jetzt gratis herunterladen

  7. #7
    madmat is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Germany
    Posts
    213

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    Quote Originally Posted by bbergmann
    but as mentioned before: manipulating the config.php does not work for SugarCRM 5.0.0!
    With SugarCRM 4.5.1 this works perfect, i can use the installation wizard with database hosts like '127.0.0.1:1234' but NOT with SugarCRM 5.0.0!
    Strange, for me it does very well.

    Have you tried to install on standard port and change it afterwards?
    Guessing by the link from roblaus it seems that only the installer might have a problem with that.

  8. #8
    Calico182 is offline Junior Member
    Join Date
    Jun 2008
    Posts
    2

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    has anyone come across any more solutions or fixes for this very annoying problem yet (besides the socket suggestion above which is not feasible as my sugarcrm is in a shared hosting environment)? the other suggestions above also don't seems to work.

    or perhaps anyone know if there is a fix currently in development?

    thanks!

  9. #9
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    Somebody should file a bug at http://bugs.sugarcrm.com/ -- the ability to specify a port number should be part of Sugar's installer.

    The temporary fix depends on whether you're using the mysql or mysqli extensions. Look at the error message you get... if the function referenced is mysql_connect(, follow these directions:

    1) open ./include/database/MysqlManager.php and find this line:

    PHP Code:
    $this->database mysql_connect($configOptions['db_host_name'],$configOptions['db_user_name'],$configOptions['db_password']) or sugar_die("Could not connect to server ".$configOptions['db_host_name']." as ".$configOptions['db_user_name'].".".mysql_error()); 
    2) replace the above line with the following lines:

    PHP Code:
    $db_hostname $configOptions['db_host_name'];
                if (!empty(
    $configOptions['db_port'])) {
                    
    $db_hostname .= ":{$configOptions['db_port']}";
                }
                
    $this->database mysql_connect($db_hostname,$configOptions['db_user_name'],$configOptions['db_password']) or sugar_die("Could not connect to server ".$configOptions['db_host_name']." as ".$configOptions['db_user_name'].".".mysql_error()); 
    3) save the file

    4) open config.php and find the 'dbconfig' section, i.e.:

    PHP Code:
      'dbconfig' => 
      array (
        
    'db_host_name' => 'localhost',
        
    'db_host_instance' => 'SQLEXPRESS'
    5) add a line above the db_host_name parameter for db_port, i.e.:

    PHP Code:
      'dbconfig' => 
      array (
        
    'db_port' => '6920',
        
    'db_host_name' => 'localhost',
        
    'db_host_instance' => 'SQLEXPRESS'
    6) save config.php and enjoy!

    A similar fix for mysqli can be made in ./include/database/MysqliManager.php if you need to.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  10. #10
    Calico182 is offline Junior Member
    Join Date
    Jun 2008
    Posts
    2

    Default Re: How to install SugarCRM 5.0 on MySQL with non-standard port?

    thanks for the reply.

    just a question though - everyone seems to refer to finding the dbconfig section of the config.php and editing that - but my config.php is empty (it's empty in the original zipped files too...) - and as soon as I put anything in it the installer just shows a blank screen.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Getting blank page
    By rept in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-05-29, 06:50 PM
  2. Awnsers Re: How to both Install and Uninstall SugarCRM
    By chrisky in forum Installation and Upgrade Help
    Replies: 3
    Last Post: 2007-08-06, 02:35 AM
  3. Quick Create not working in Contacts popup
    By pniranjan in forum Developer Help
    Replies: 1
    Last Post: 2007-04-26, 02:10 PM
  4. Replies: 2
    Last Post: 2004-12-16, 02:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •