Changes

From SME Server
Jump to navigationJump to search
894 bytes added ,  05:55, 29 May 2019
Line 5: Line 5:  
[[File:Mysql.png]]
 
[[File:Mysql.png]]
 
</blockquote>
 
</blockquote>
 
+
__TOC__
 
== Description ==
 
== Description ==
   Line 23: Line 23:     
=== Version ===
 
=== Version ===
{{ #smeversion: smeserver-mysql57}}
+
{{#smeversion: smeserver-mysql57}}
    
=== Maintainer ===
 
=== Maintainer ===
[mailto:tests@pialasse.com[[User:Unnilennium|Unnilennium]]]
+
[mailto:tests@pialasse.com][[User:Unnilennium|Unnilennium]]
    
==Installation==
 
==Installation==
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
   Line 61: Line 75:  
For your convenience, aliases have been added :  mysql57, mysqlshow57, mysqladmin57, mysqldump57, mysqlimport57 and mysqlbinlog57
 
For your convenience, aliases have been added :  mysql57, mysqlshow57, mysqladmin57, mysqldump57, mysqlimport57 and mysqlbinlog57
   −
The following will connect to database wordpress in mysql57 server, and present the mysql prompt so you can work with the database.
+
Assuming you have a wordpress database setup, the following will connect to database wordpress in mysql57 server, and present the mysql prompt so you can work with the database.
    
  mysql57 wordpress
 
  mysql57 wordpress
 +
 +
However the full command line to access, per instance to mysql55 server with the mysql client against its version would be :
 +
 +
mysql57
 +
 +
Alternatively:
    
The complete path to the specific version of mysql57 server with the mysql client would be:  
 
The complete path to the specific version of mysql57 server with the mysql client would be:  
Line 95: Line 115:  
  expand-template /root/.my.cnf
 
  expand-template /root/.my.cnf
 
  expand-template /var/service/mysql57-mysqld/set.password
 
  expand-template /var/service/mysql57-mysqld/set.password
  /opt/rh/mysql57/root/usr/libexec/mysqld --socket=/var/lib/mysql/mysql57.sock --bootstrap --user=mysql --skip-grant-tables < /var/service/mysql57-mysqld/set.password
+
scl enable rh-mysql57 bash
 +
  /opt/rh/rh-mysql57/root/usr/libexec/mysqld --socket=/var/lib/mysql/mysql57.sock --bootstrap --user=mysql --skip-grant-tables < /var/service/mysql57-mysqld/set.password
 +
exit
 
  service mysql57-mysqld start
 
  service mysql57-mysqld start
   Line 109: Line 131:     
Only versions released in smecontrib are listed here:  
 
Only versions released in smecontrib are listed here:  
{{ #smechangelog: smeserver-mysql57}}
+
{{#smechangelog: smeserver-mysql57}}
 
      
[[Category: Contrib]]
 
[[Category: Contrib]]
 
[[Category: Software Collections]]
 
[[Category: Software Collections]]
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,239

edits

Navigation menu