Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 35: Line 35:  
  scl enable mysql55 'man mysql55'
 
  scl enable mysql55 'man mysql55'
 
press 'q' to leave the man page
 
press 'q' to leave the man page
 +
 +
===Changes to my.cnf configuration file===
 +
Now that the scl version of MySQL is installed, the /opt/rh/mysql55/root/etc/my.cnf configuration file has to be adjusted so that the scl version of MySQL does not interfere with the standard version of MySQL.
 +
 +
The default port of MySQL is 3306, for the scl version of MySQL we will use port 3307, but this can be any port of your choosing.
 +
 +
The default socket file is /var/lib/mysql/mysql.sock, for the scl version of MySQL we will use /var/lib/mysql/mysql55.sock.
 +
 +
/opt/rh/mysql55/root/etc/my.cnf will then be:
 +
 +
 +
<nowiki>
 +
[mysqld]
 +
datadir=/opt/rh/mysql55/root/var/lib/mysql
 +
socket=/var/lib/mysql/mysql55.sock
 +
# Disabling symbolic-links is recommended to prevent assorted security risks
 +
symbolic-links=0
 +
# Settings user and group are ignored when systemd is used.
 +
# If you need to run mysqld under different user or group,
 +
# customize your systemd unit file for mysqld according to the
 +
# instructions in http://fedoraproject.org/wiki/Systemd
 +
port=3307
 +
 +
 +
[mysqld_safe]
 +
log-error=/var/log/mysql55-mysqld.log
 +
pid-file=/opt/rh/mysql55/root/var/run/mysqld/mysqld.pid
 +
</nowiki>
       
===Start/Stop MySQL===
 
===Start/Stop MySQL===
{{Note box|Before MySQL can be started, the socket file defined in /opt/rh/mysql55/root/etc/my.cnf has to be adjusted for it is the same as the default installation of MySQL. The correct 3rd line should read: ''' <nowiki>socket=/var/lib/mysql/mysql55.sock</nowiki>'''}}
  −
   
{{Note box|How to connect to mysql55, for using 'mysql' will invoke the CLI of the standard MySQL version and not the scl version. Not even when trying to start /opt/rh/mysql55/bin/mysql, it will invoke the 'old' MySQL.}}  
 
{{Note box|How to connect to mysql55, for using 'mysql' will invoke the CLI of the standard MySQL version and not the scl version. Not even when trying to start /opt/rh/mysql55/bin/mysql, it will invoke the 'old' MySQL.}}  
 
MySQL is now installed and can be started and stopped manually via:
 
MySQL is now installed and can be started and stopped manually via:

Navigation menu