Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 5. Migration
5.1. Migrating from MySQL 5.1 to MySQL 5.5 Link kopierenLink in die Zwischenablage kopiert!
5.1.1. Notable Differences Between MySQL 5.1 and MySQL 5.5 Link kopierenLink in die Zwischenablage kopiert!
- Starting with MySQL 5.5, the InnoDB storage engine (formerly known as InnoDB Plugin) is the default storage engine.
- InnoDB and some other plug-ins (for example, archive, blackhole and federated) were installable plug-ins in MySQL 5.1. Starting with MySQL 5.5, these plug-ins became compiled-in storage engines, that is, they cannot be installed or uninstalled by default.
- If you used InnoDB Plugin and it was loaded using the
plugin-load=innodb=ha_innodb_plugin.so
configuration option, you need to remove this configuration option as it does not work in MySQL 5.5. - In MySQL 5.1, InnoDB Plugin included a configuration variable
innodb_file_io_threads
. However, this variable does not exist in MySQL 5.5; new variables,innodb_read_io_threads
andinnodb_write_io_threads
, are used instead. To ensure proper functionality, either remove the former variable from the configuration file or replace it with the current variables. - When upgrading from MySQL 5.1 to MySQL 5.5 using the in-place upgrading method, the
mysql.proxies_priv
table will not exist. To create the missing table, the mysql_upgrade utility has to be run as soon as the new daemon is started. - MySQL 5.5 uses latin1 for the
stopword
file if thecharacter_set_server
variable is ucs2, utf16 or utf32. Thus, if the table uses FULLTEXT indexes in these cases, users should repair the table using theREPAIR TABLE table_name QUICK
. - MySQL 5.1 used the
language
variable for specifying the directory which included the error message file. This option is now deprecated and has been replaced by thelc_messages_dir
andlc_messages
options. This also applies for configuration options. Also, error messages no longer contain mixed set of character sets and error messages are returned in the set following thecharacter_set_results
system variable instead. That is, some error messages can be different in MySQL 5.5.
Important
5.1.2. Upgrading from MySQL 5.1 to MySQL 5.5 Link kopierenLink in die Zwischenablage kopiert!
- In the first scenario, the whole dump of all databases from one database is generated, mysql is run with the dump file as an input, using mysqlimport or the
LOAD DATA INFILE
SQL command within the other database. At the same time, the appropriate daemons have to be running during both dumping and restoring. You can use the--all-databases
option in the mysqldump call to include all databases in the dump. The--routines
,--triggers
and--events
options can also be used if needed. - During the in-place upgrade, the data files are copied from one database directory to another database directory. The daemons should not be running at the time of copying. Set the appropriate permissions and SELinux context for copied files.
mysql_upgrade
command. Running mysql_upgrade
is necessary to check and repair internal tables.
Important
mysql_upgrade
script, should be run inside the scl enable
environment.
root
user has a non-empty password defined (it should have it defined), it is necessary to call the mysql_upgrade utility with the -p
option and specify the password.
my.cnf
file to reflect the environment.
Example 5.1. Dump and Restore Upgrade
Example 5.2. In-place Upgrade
Important
- The mariadb55 component name should be used instead of the mysql55, so replace all occurrences of
mysql55
withmariadb55
. - The
systemd
unit name for MariaDB 5.5. ismariadb55-mariadb
in Red Hat Enterprise Linux 7, while theSysV
unit script for MariaDB 5.5 is calledmariadb55-mysqld
in Red Hat Enterprise Linux 6.
5.1.3. Using the mysql55-mysql-devel Package Link kopierenLink in die Zwischenablage kopiert!
5.1.3.1. Using Database Connectors for Dynamic Languages Link kopierenLink in die Zwischenablage kopiert!
Important
mysqlnd
driver will not be able to connect to the database. This is because the old_password
setting in the /etc/my.cnf
file is turned off by default on Red Hat Enterprise Linux 6 while it is enabled on Red Hat Enterprise Linux 5. To work around this problem, set old_password
to 0, restart the MariaDB or MySQL service and set a new password for each user.
5.1.3.2. Building Applications for MySQL 5.5 from Red Hat Software Collections Link kopierenLink in die Zwischenablage kopiert!
scl enable mysql55 '...'
call.
5.2. Migrating from PostgreSQL 8.4 to PostgreSQL 9.2 Link kopierenLink in die Zwischenablage kopiert!
5.2.1. Notable Differences Between PostgreSQL 8.4 and PostgreSQL 9.2 Link kopierenLink in die Zwischenablage kopiert!
- The following server configuration parameters have been removed and are no longer supported:
add_missing_from
,regex_flavor
,silent_mode
,wal_sender_delay
, andcustom_variable_classes
. Do not use any of these parameters in the new configuration file. - The
unix_socket_directory
parameter has been renamed tounix_socket_directories
and can now be used to specify more than one UNIX socket to listen on. To do so, provide a list of comma-separated directories as the value of this option. The default value remains unchanged and is/tmp
. - New configuration parameters
ssl_ca_file
,ssl_cert_file
,ssl_crl_file
, andssl_key_file
have been added. These configuration parameters can be used to specify the locations of server-side SSL files that were previously hard-coded as relative paths to theroot.crt
,server.crt
,root.crl
, andserver.key
files in the data directory.Note that the PostgreSQL server no longer reads theroot.crt
androot.crl
files by default. To load these files, change the corresponding parameters to non-default values. - The
=>
operator has been removed and users are now advised to use thehstore(text, text)
function. - The default value of the
standard_conforming_strings
configuration parameter is nowon
. This configuration parameter controls if ordinary string literals (strings enclosed in single quotes) treat backslashes literally as specified in the SQL standard. - A new configuration parameter,
backslash_quote
, has been added. This configuration parameter can be used to control whether a single quotation mark can be represented by\'
in string literals. The default value issafe_encoding
, which permits the use of\'
only when the client encoding does not allow ASCII backslashes in multi-byte characters. As a consequence,\'
can now be interpreted differently only in specific cases and only in string literals that do not conform to standards, including escape string syntax,E'value'
. - PostgreSQL 9.0 introduced access privileges for large objects. Consequently, a new configuration parameter,
lo_compat_privileges
, has been added to allow you to disable security checks related to the large objects affected by this change. To disable these security checks, change the value of this configuration parameter toon
. The default value isoff
.
5.2.2. Upgrading from PostgreSQL 8.4 to PostgreSQL 9.2 Link kopierenLink in die Zwischenablage kopiert!
Important
/var/lib/pgsql/data/
directory.
Procedure 5.1. Performing In-place Upgrade
- Stop the old PostgreSQL server to ensure that the data is not in an inconsistent state. To do so, type the following at a shell prompt as
root
:service postgresql stop
service postgresql stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To verify that the server is not running, type:service postgresql status
service postgresql status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the new data directory located in
/opt/rh/postgresql92/root/var/lib/pgsql/data/
does not exist:file /opt/rh/postgresql92/root/var/lib/pgsql/data/
file /opt/rh/postgresql92/root/var/lib/pgsql/data/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are running a fresh installation of PostgreSQL 9.2, this directory should not be present in your system. If it is, back it up by running the following command asroot
:mv /opt/rh/postgresql92/root/var/lib/pgsql/data{,-scl-backup}
mv /opt/rh/postgresql92/root/var/lib/pgsql/data{,-scl-backup}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the old database data to the new location by typing the following at a shell prompt as
root
:cp -ra /var/lib/pgsql/data/ /opt/rh/postgresql92/root/var/lib/pgsql/
cp -ra /var/lib/pgsql/data/ /opt/rh/postgresql92/root/var/lib/pgsql/
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the
/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_hba.conf
configuration file and verify that thepostgres
user is allowed to connect to the PostgreSQL server fromlocalhost
without a password. If not, you can edit this file and temporarily set the authentication method for thepostgres
user totrust
orident
. For a detailed description of thepg_hba.conf
file and a complete list of available configuration options, see the official documentation. - Upgrade the database data for the new server by running the following command as
root
:service postgresql92-postgresql upgrade
service postgresql92-postgresql upgrade
Copy to Clipboard Copied! Toggle word wrap Toggle overflow It is recommended that you read the resulting/opt/rh/postgresql92/root/var/lib/pgsql/pgupgrade.log
log file to see if there were any problems with the upgrade. - Start the new server as
root
:service postgresql92-postgresql start
service postgresql92-postgresql start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow It is also advised that you run theanalyze_new_cluster.sh
script as follows:su - postgres -c 'scl enable postgresql92 ~/analyze_new_cluster.sh'
su - postgres -c 'scl enable postgresql92 ~/analyze_new_cluster.sh'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Optionally, you can configure the PostgreSQL 9.2 server to start automatically at boot time. To disable the old PostgreSQL 8.4 server, type the following command as
root
:chkconfig postgresql off
chkconfig postgresql off
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To enable the PostgreSQL 9.2 server, type asroot
:chkconfig postgresql92-postgresql on
chkconfig postgresql92-postgresql on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 5.2. Performing a Dump and Restore Upgrade
- Ensure that the old PostgreSQL server is running by typing the following at a shell prompt as
root
:service postgresql start
service postgresql start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Dump all data in the PostgreSQL database into a script file. As
root
, type:su - postgres -c 'pg_dumpall > ~/pgdump_file.sql'
su - postgres -c 'pg_dumpall > ~/pgdump_file.sql'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Stop the old server by running the following command as
root
:service postgresql stop
service postgresql stop
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Initialize the data directory for the new server as
root
:service postgresql92-postgresql initdb
service postgresql92-postgresql initdb
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the new server as
root
:service postgresql92-postgresql start
service postgresql92-postgresql start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Import data from the previously created SQL file:
su - postgres -c 'scl enable postgresql92 "psql -f ~/pgdump_file.sql postgres"'
su - postgres -c 'scl enable postgresql92 "psql -f ~/pgdump_file.sql postgres"'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Optionally, you can configure the PostgreSQL 9.2 server to start automatically at boot time. To disable the old PostgreSQL 8.4 server, type the following command as
root
:chkconfig postgresql off
chkconfig postgresql off
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To enable the PostgreSQL 9.2 server, type asroot
:chkconfig postgresql92-postgresql on
chkconfig postgresql92-postgresql on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - If your configuration differs from the default one, make sure to update configuration files, especially the
/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_hba.conf
configuration file. Otherwise only thepostgres
user will be allowed to access the database.
5.3. Migrating from nginx 1.4 to nginx 1.6 Link kopierenLink in die Zwischenablage kopiert!
/opt/rh/nginx16/root/
. The error log is now stored in /var/log/nginx16/error.log
by default, and the initscript is called nginx16-nginx
.
Important
/opt/rh/nginx14/root/
tree.
/opt/rh/nginx14/root/
tree, replicate those changes in the new /opt/rh/nginx16/root/
directory, too.