Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to specify the Database connection port number? 
 
Lionel
Jr. Member
 
Total Posts:  4
Joined:  2007-08-31
 

I am using MySQL from MAMP listening on port 8889.

When I specify:
127.0.0.1:8889
as the host of the database connection I get as an error
“ Unknown MySQL server host ‘127.0.0.1:8889’ (1) “

If I don’t specify the port I get logically:
“ Can’t connect to MySQL server on ‘127.0.0.1’ (61) “

How do I specify Magento to connect on 8889?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ekosch
Jr. Member
 
Total Posts:  4
Joined:  2007-08-31
 

cheese sorry I’m still confuse at installation step
i will go to this step after finishing installation procedure red face

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lionel
Jr. Member
 
Total Posts:  4
Joined:  2007-08-31
 

The setting of the DB actually occurs at the very begining of the installation procedure in the Configuration first step.

 
Magento Community Magento Community
Magento Community
Magento Community
 
philoye
Jr. Member
 
Total Posts:  14
Joined:  2007-09-02
 

I’m in the same boat as you Lionel. Can’t connect to the db when I specify a port.

FYI, I’m able to connect to my database via phpMyAdmin and MySQL Administrator (for OS X) using 127.0.0.1:8889 with my user/pass.

Any help would be appreciated,
p.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lionel
Jr. Member
 
Total Posts:  4
Joined:  2007-08-31
 

Ok. I simply changed the port number in MAMP to be 3306 (the default port number for mysql) and it worked like a charm.
I guess in the future Magento will provide an easy way to choose the port number.

 
Magento Community Magento Community
Magento Community
Magento Community
 
philoye
Jr. Member
 
Total Posts:  14
Joined:  2007-09-02
 

I guess that’s the answer for now… Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
philoye
Jr. Member
 
Total Posts:  14
Joined:  2007-09-02
 

For what it is worth, I’m using my binary install of MySQL which already resides on 3306. So MAMP for the webserver, but my own database.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Support for non standard port or unix socket will be available in next release.

Meanwhile you can replace these 2 files:
Mysql.php: lib/Varien/Db/Adapter/Pdo/Mysql.php
Mysqli.php: lib/Varien/Db/Adapter/Mysqli.php

Specify non-standard port like this:

localhost:3307

For unix socket use only the path in DB host field during install:

/tmp/mysql5.sock

You can also try changing the driver Magento will access mysql in app/etc/config.xml:

<type>mysqli</type>

There are driver types under <core_setup> (used during install/upgrade) and <core_write> (used during normal operation). Possible values are mysqli and pdo_mysql

File Attachments
Mysql.php  (File Size: 5KB - Downloads: 901)
Mysqli.php  (File Size: 5KB - Downloads: 566)
 
Magento Community Magento Community
Magento Community
Magento Community
 
i960
Guru
 
Avatar
Total Posts:  633
Joined:  2007-10-01
Bakersfield, CA
 

Worked like a charm.  Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lionel
Jr. Member
 
Total Posts:  4
Joined:  2007-08-31
 

Tried it today : awesome.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
connectr
Member
 
Avatar
Total Posts:  48
Joined:  2007-10-11
Cape Town, South Africa
 

hi guys,
not sure if this is related, but i’ve just installed magneto locally on my intel macbook pro, with the latest version of mamp pro (1.7) using the latest release of magento 0.6.13160. the install went fine, but magento doesn’t seem to be functioning properly. i can login to the admin, but when i click on certain links (like manage categories) i just get a blank white page. i’ve set mamp ports to 80 and 3307, as well as tried the other steps mentioned above, but nothing seems to work.
any ideas?
thanks,
chris

ps, not sure if its just me experiencing probs with the forum, but the quick reply and post reply functions seem a bit temperamental. i’ve been trying to post a quick reply, but just get taken to the post reply page - then when i try post there, the page tries to submit, but just reverts to post reply page again…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@stocker: Try upping memory_limit to 20-32MB in php.ini

 
Magento Community Magento Community
Magento Community
Magento Community
 
connectr
Member
 
Avatar
Total Posts:  48
Joined:  2007-10-11
Cape Town, South Africa
 

hi moshe,
i tried that but no luck… its strange that some pages work and others not. been digging around in the code but cant find anything obvious.
thanks,
chris

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top