Changes

From SME Server
Jump to navigationJump to search
Line 60: Line 60:  
== Usage ==
 
== Usage ==
   −
PHP application aware of sockets are few, most of them will try to connect to a port, you will have to find a way to define the one you want to use for your particular app. Some let you put it in a variable, some will just need you to add it after the hostname or ip (localhost:3307), some will just assume 3306 and just ignore anything else.
+
By default mysql55 uses a socket for connections.
   −
Possible host strings (localhost can be replaced with 127.0.0.1 if needed):
+
Depending on your application syntax the socket can be found at like this (localhost can be replaced with 127.0.0.1 if needed):
    
* localhost:/var/lib/mysql/mysql55.sock
 
* localhost:/var/lib/mysql/mysql55.sock
 
* localhost;unix_socket=/var/lib/mysql/mysql55.sock
 
* localhost;unix_socket=/var/lib/mysql/mysql55.sock
 +
 +
PHP applications that are aware of sockets are few, and most of them will try to connect to a port. To enable mysql55 to use a port you will need to do the following:
 +
 +
config setprop mysq55-mysql LocalNetworkingOnly no
 +
signal-event post-upgrade;signal-event reboot
 +
 +
mysq55 should now be listening on port 3307. you can check this using netstat:
 +
 +
netstat -atn |grep 3307
 +
 +
Beware that some applications just assume the running port number, so to connect to mysql55 on 3307 instead of stock mysql on 3306 you will need to carefully investigate and modify your application accordingly e.g.
 +
 
* localhost:3307
 
* localhost:3307
  

Navigation menu