![]() |
Mysql Alternate port - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Mysql Alternate port (/showthread.php?tid=10317) Pages:
1
2
|
Mysql Alternate port - El Forum - 07-26-2008 [eluser]percent20[/eluser] The mysql server i have to use isn't using the standard port 3306 how can i configure CI to use an alternate port. The documentation says the port property is for postgreSQL. ideas? I did some searching but couldn't find anything. Mysql Alternate port - El Forum - 07-26-2008 [eluser]Randy Casburn[/eluser] Did you try putting... $db['default']['port'] = "PORTNUMBERHERE"; in your database configuration file? Of course you'll want to change PORTNUMBERHERE to the correct port number. Try it and see if it bytes you. Randy Mysql Alternate port - El Forum - 07-26-2008 [eluser]percent20[/eluser] isn't working. Mysql Alternate port - El Forum - 07-26-2008 [eluser]Randy Casburn[/eluser] ok...I just assumed that your db setting were 'default' and all that too. But since you're kind of bent on just give the barest minimum possible (even contracted) word answers but expect magic responses... Let's see where we can go from here... OK..checked the code and was surprised to find the lack of support. so I'll submit and ticket and see what we can do to get it changed... In the mean time, you'll either have to connect manually or hack the CI core to make it work. Your choice. Randy Mysql Alternate port - El Forum - 07-26-2008 [eluser]percent20[/eluser] I don't honestly know what else answers I can give. You are right everything was default and I would have stated otherwise. At the point of doing some googling and re-reading of the user guide i decided to post since I have no idea what is going on under the hood of CI. And if you must no I could have stretched the two words longer to a 6 or even 10 word sentence but I was being yelled at to go pick-up dinner so I wasn't able to expand much. which would be easier? connection manually or hacking up the core? Mysql Alternate port - El Forum - 07-26-2008 [eluser]Randy Casburn[/eluser] That's cool about asking for help and definitely go get dinner for sure!! The right thing to do is connect yourself, not hacking the core. I'm sure someone else has already solved this. Let me do some digging and get back to you. Randy Mysql Alternate port - El Forum - 07-26-2008 [eluser]percent20[/eluser] ok, awesome. Please let me know if you find anything. I admit I suck at searching I am just not good with keywords. It is actually a joke around my office that people shouldn't ask me to do google searches because I suck at it so bad. Mysql Alternate port - El Forum - 07-26-2008 [eluser]Colin Williams[/eluser] Code: $db['default']['hostname'] = "http://www.example.com:3306"; Maybe that works? I didn't try. UPDATE: Should work. Here's PHP docs on mysql_connect() Quote:$server: Mysql Alternate port - El Forum - 07-26-2008 [eluser]Yash[/eluser] Nice find Colin Williams Mysql Alternate port - El Forum - 07-26-2008 [eluser]Randy Casburn[/eluser] Yes. Didn't even cross my mind to add it to the host name in the config entry. I submitted the required code as a bug report to fix this in the core. There is no reason why this should not be in the core and allow the configuration setting in the database configuration file. We'll see what they say. Please search the bug reports for today if you have questions or comments about what I submitted. Randy |