Line 2: |
Line 2: |
| | | |
| This contrib purpose is to help configuring mysql55 on SME8 and SME9 using software collection. | | This contrib purpose is to help configuring mysql55 on SME8 and SME9 using software collection. |
| + | |
| + | This RPM will allow you to have 2 versions of Mysql running. You will have to select the one to use in the setup of the specific application - please see "usage" below. Please note that phpmyadmin etc. will as standard use the original Mysql DBS for your OS unless you change the database connection to Mysql 5.5. |
| | | |
| Most of configuration options are explained for mysql here : [[MySQL]] are also available for mysql55 ( except innoDB options). Only difference is to prefix mysqld and mysql.init db entry by "mysql55-". | | Most of configuration options are explained for mysql here : [[MySQL]] are also available for mysql55 ( except innoDB options). Only difference is to prefix mysqld and mysql.init db entry by "mysql55-". |
Line 7: |
Line 9: |
| Note that default behaviour will be socket only, and if you enable networking, it will listen on 3307 locally. You then will need to open port to 3307 to access remotely. Also if you want another port you need to define mysql55-mysqld property port to whatever you want. Also remember that default mysql port is reserved to original mysql server | | Note that default behaviour will be socket only, and if you enable networking, it will listen on 3307 locally. You then will need to open port to 3307 to access remotely. Also if you want another port you need to define mysql55-mysqld property port to whatever you want. Also remember that default mysql port is reserved to original mysql server |
| | | |
− | this RPM will allow you to have 2 versions of mysql running!!!
| + | See also for reference: [[Software_Collections:MySQL]] |
− | | |
− | see also for reference: [[Software_Collections:MySQL]]
| |
| | | |
| For SME9 Software collection is only available for x64 architectures. | | For SME9 Software collection is only available for x64 architectures. |
Line 31: |
Line 31: |
| signal-event reboot | | signal-event reboot |
| | | |
− | == command line == | + | == Command line == |
| + | |
| + | If you need to work with this version of MySql on the command line you will have to specify the right socket. |
| | | |
| /opt/rh/mysql55/root/usr/bin/mysql --socket=/var/lib/mysql/mysql55.sock | | /opt/rh/mysql55/root/usr/bin/mysql --socket=/var/lib/mysql/mysql55.sock |
| + | |
| + | or use TCP on port 3307: |
| + | |
| + | /opt/rh/mysql55/root/usr/bin/mysql --protocol=TCP --port=3307 |
| + | |
| + | == 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. |
| + | |
| + | Possible host strings (localhost can be replaced with 127.0.0.1 if needed): |
| + | |
| + | * localhost:3307 |
| + | * localhost;unix_socket=/var/lib/mysql/mysql55.sock |
| + | * localhost:/var/lib/mysql/mysql55.sock |
| + | |
| + | For Wordpress adjust the DB_HOST value in the wp-config.php file accordingly. |
| + | |
| + | define( 'DB_HOST', 'localhost:/var/lib/mysql/mysql55.sock' ); |
| | | |
| == Resetting the MySQL root password == | | == Resetting the MySQL root password == |