https://bugs.contribs.org/show_bug.cgi?id=10617
Bug ID: 10617
Summary: mysql55 server localhost may not use correct port
Classification: SME Server Extras
Product: SME Server Documentation
Version: 9.2
Hardware: ---
OS: ---
Status: CONFIRMED
Severity: normal
Priority: P3
Component: Unknown
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Depends on: 10616
Target Milestone: ---
+++ This bug was initially created as a clone of Bug #10616 +++
Not sure where this should really go as it isn't an issue with MySQL per se.
But likely people will look for an answer in the MySQL sections of the Wiki.
When updating my CRM recently we discovered a nasty little issue in PHP that
affects mysql queries.
If you use server 'localhost' the PHP mysql commands may ignore the port
setting
e.g
server: localhost
port: 3307
In this scenario PHP will actually try and use port 3306
The fix is to use:
server: 127.0.0.1
Alternatively use a socket (I was not able to)
I wrote a little bit of code to test this as attached and it demonstrates this
is the case. Just save it, add some DB details and then run it with:
php56 -f datacon.php
I wanted to note this here for anyone else who falls over it, but it should
probably be cloned/moved to a Documentation bug.
This probably also affect mysql57
Referenced Bugs:
https://bugs.contribs.org/show_bug.cgi?id=10616
[Bug 10616] mysql55 server localhost may not use correct port
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/