Changes

From SME Server
Jump to navigationJump to search
661 bytes added ,  12:07, 1 May 2019
no edit summary
Line 5: Line 5:  
[[File:Mysql.png]]
 
[[File:Mysql.png]]
 
</blockquote>
 
</blockquote>
 
+
__TOC__
 
== Description ==
 
== Description ==
   Line 43: Line 43:     
== Usage ==
 
== Usage ==
 +
 +
By default mysql57 uses a socket for connections.
    
PHP applications that are aware of sockets are few, and most typically try to connect to a port. You will have to craft 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:3309), some will just assume 3306 and just ignore anything else.
 
PHP applications that are aware of sockets are few, and most typically try to connect to a port. You will have to craft 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:3309), some will just assume 3306 and just ignore anything else.
Line 50: Line 52:  
* localhost:/var/lib/mysql/mysql57.sock
 
* localhost:/var/lib/mysql/mysql57.sock
 
* localhost;unix_socket=/var/lib/mysql/mysql57.sock
 
* localhost;unix_socket=/var/lib/mysql/mysql57.sock
 +
 +
PHP applications that are aware of sockets are few, and most of them will try to connect to a port. To enable mysql57 to use a port you will need to do the following:
 +
 +
config setprop mysql57-mysqld port 3309 LocalNetworkingOnly no
 +
signal-event post-upgrade;signal-event reboot
 +
 +
mysq57 should now be listening on port 3309. you can check this using netstat:
 +
 +
netstat -atn |grep 3309
 +
 +
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:3309
 
* localhost:3309
  

Navigation menu