Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1002963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:54:18+00:00 2026-05-16T07:54:18+00:00

On my Unix web server, I have two MySQL database servers running. One on

  • 0

On my Unix web server, I have two MySQL database servers running. One on port 3306, and another on 3307. I wanted to specify the port number of database to connect in /config/database.php of codeigniter.

I tried this….

$database['hostname'] = "localhost:3307";

This did not work. The webapp connected to database on port 3306.

Then I tried this….

$database['hostname'] = "127.0.0.1:3307";

This worked. The webapp got connected to the database on port 3307.

I don’t understand why? Can somebody please throw some light on this.
I think this is not a codeigniter specific issue inspite of the title.

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:54:18+00:00Added an answer on May 16, 2026 at 7:54 am

    I’d guess localhost is valid for IPv6 also, but 127.0.0.1 is undeniably an IPv4 address, so therefore it might throw some spanners into your machinery.

    I’ve run into that a few times. (FireFox is/was notorious for being slow on localhost:8000 but fast on 127.0.0.1:8000 when developing with Django)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two (UNIX) programs A and B that read and write from stdin/stdout.
Trying to separate out my LAMP application into two servers, one for php and
Unix.....>>netstat -al | grep 8787 (will see packets on port 8787)
I am looking for a dedicated server because shared webhosting solutions have some limitations.
my proble is to avoid that users upload some malicious file on my web-server.
In Unix/Linux, how do you find out what group a given user is in
On Unix, I can either use \r (carriage return) or \b (backspace) to overwrite
In Unix, can I run make in a directory without cd 'ing to that
In Unix C programming, is it considered good practice to explicitly close file handles
On the UNIX bash shell (specifically Mac OS X Leopard) what would be the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.