Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 1: Line 1:  +
<blockquote style="float: right;">
 +
[[File:softwarecollections.png|100px]]
 +
</blockquote>
 +
<blockquote style="float: right;">
 +
[[File:Mysql.png]]
 +
</blockquote>
 +
__TOC__
 
== Description ==
 
== Description ==
   Line 14: Line 21:     
=== Version ===
 
=== Version ===
{{ #smeversion: smeserver-mysql55}}
+
{{#smeversion: smeserver-mysql55}}
    
=== Maintainer ===
 
=== Maintainer ===
[mailto:tests@pialasse.com[[User:Unnilennium|Unnilennium]]]
+
[mailto:tests@pialasse.com][[User:Unnilennium|Unnilennium]]
    
==Installation==
 
==Installation==
Line 32: Line 39:     
== Command line ==
 
== Command line ==
For your convenience, aliases have been added :  mysql57, mysqlshow57, mysqladmin57, mysqldump57, mysqlimport57 and mysqlbinlog57
+
For your convenience, aliases have been added :  mysql55, mysqlshow55, mysqladmin55, mysqldump55, mysqlimport55 and mysqlbinlog55
   −
mysql57 wordpress
+
Assuming you have a wordpress database setup, the following will connect to database wordpress in mysql55 server, and present the mysql prompt so you can work with the database.
   −
will connect you to database wordpress in  mysql57 server, and let you with the mysql prompt to work.
+
mysql55 wordpress
    +
However the full command line to access, per instance to mysql55 server with the mysql client against its version would be :
 +
 +
mysql55
 +
 +
Alternatively:
   −
However the full command line to access, per instance to mysql57 server with the mysql client agianst its version would be :
   
If you need to work with this version of MySql on the command line you will have to specify the right socket.
 
If you need to work with this version of MySql on the command line you will have to specify the right socket.
   Line 47: Line 58:     
  /opt/rh/mysql55/root/usr/bin/mysql --protocol=TCP --port=3307
 
  /opt/rh/mysql55/root/usr/bin/mysql --protocol=TCP --port=3307
 +
 +
Note that using the regular 5.1 client may work, but can lead to unexpected results:
 +
mysql  --socket=/var/lib/mysql/mysql55.sock
    
== 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):
+
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.
    
* 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 mysql55-mysqld port 3307 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
 +
 +
{{Warning box|1=Note that you may experience issues with PHP connecting to the correct port if you use localhost. There is an obscure bug in PHP which means you will need to use 127.0.0.1 instead of localhost. Please see See bug https://bugs.contribs.org/show_bug.cgi?id=10616 for more information}}
    
For Wordpress adjust the DB_HOST value in the wp-config.php file accordingly.
 
For Wordpress adjust the DB_HOST value in the wp-config.php file accordingly.
Line 83: Line 111:     
Only versions released in smecontrib are listed here:  
 
Only versions released in smecontrib are listed here:  
{{ #smechangelog: smeserver-mysql55}}
+
{{#smechangelog: smeserver-mysql55}}
 
      
[[Category: Contrib]]
 
[[Category: Contrib]]
 
[[Category: Software Collections]]
 
[[Category: Software Collections]]

Navigation menu