@ -28,10 +28,11 @@ startup script in %{_sysconfdir}/init.d/. 
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
		
			
				 
				 
				  if  [  " $old_family "  !=  " $new_family "  ] ;  then  
				 
				 
				  if  [  " $old_family "  !=  " $new_family "  ] ;  then  
			
		 
		
	
		
			
				 
				 
				    error_text = " $error_text  
				 
				 
				    error_text = " $error_text  
			
		 
		
	
		
			
				 
				 
				Upgrading directly from MySQL $old_family  to MariaDB $new_family  may not 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				be safe in all cases.  A manual dump and restore using mysqldump is 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				recommended.  It is important to review the MariaDB manual' s Upgrading 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				section for  version-specific incompatibilities. 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				Upgrading directly from MariaDB or MySQL $old_family  
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				to MariaDB $new_family  may not be safe in all cases. 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				A manual dump and restore using mariadb-dump ( or mysqldump)  is recommended. 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				It is important to review the MariaDB manual' s Upgrading section for  
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				version-specific incompatibilities. 
			
		 
		
	
		
			
				 
				 
				"  
				 
				 
				"  
			
		 
		
	
		
			
				 
				 
				  fi  
				 
				 
				  fi  
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
	
		
			
				
					
					
					
						
							 
						 
					
				 
				@ -39,23 +40,23 @@ section for version-specific incompatibilities. 
			
		 
		
	
		
			
				 
				 
				    cat <<HERE >& 2  
				 
				 
				    cat <<HERE >& 2  
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
		
			
				 
				 
				****************************************************************** 
				 
				 
				****************************************************************** 
			
		 
		
	
		
			
				 
				 
				A MySQL or M ariaDB server package ( $installed )  is installed. 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				A MariaDB or MySQL  server package ( $installed )  is installed. 
			
		 
		
	
		
			
				 
				 
				$error_text  
				 
				 
				$error_text  
			
		 
		
	
		
			
				 
				 
				A manual upgrade is required. 
				 
				 
				A manual upgrade is required. 
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
		
			
				 
				 
				- Ensure that you have a complete, working backup of your data and my.cnf 
				 
				 
				- Ensure that you have a complete, working backup of your data and my.cnf 
			
		 
		
	
		
			
				 
				 
				  files 
				 
				 
				  files 
			
		 
		
	
		
			
				 
				 
				- Shut down the MySQL server cleanly 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				- Remove the existing MySQL packages.   Usually this command  will 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				- Shut down the MariaDB or M ySQL server cleanly 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				- Remove the existing MariaDB or M ySQL packages. Usually this command  will 
			
		 
		
	
		
			
				 
				 
				  list the packages you should remove: 
				 
				 
				  list the packages you should remove: 
			
		 
		
	
		
			
				 
				 
				  rpm -qa |  grep -i '^mysql-'  
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				  rpm -qa |  grep -iE  '^(mariadb| mysql) -'  
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
		
			
				 
				 
				  You may choose to use 'rpm --nodeps -ev <package-name>'  to remove 
				 
				 
				  You may choose to use 'rpm --nodeps -ev <package-name>'  to remove 
			
		 
		
	
		
			
				 
				 
				  the package which contains the mysqlclient shared library.  The 
				 
				 
				  the package which contains the mysqlclient shared library.  The 
			
		 
		
	
		
			
				 
				 
				  library will be reinstalled by the MariaDB-shared package. 
				 
				 
				  library will be reinstalled by the MariaDB-shared package. 
			
		 
		
	
		
			
				 
				 
				- Install the new MariaDB packages supplied by $myvendor  
				 
				 
				- Install the new MariaDB packages supplied by $myvendor  
			
		 
		
	
		
			
				 
				 
				- Ensure that the MariaDB server is started 
				 
				 
				- Ensure that the MariaDB server is started 
			
		 
		
	
		
			
				 
				 
				- Run the 'mysql_ upgrade'  program 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				- Run the 'mariadb- upgrade'  program 
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
		
			
				 
				 
				This is a brief description of the upgrade process.  Important details 
				 
				 
				This is a brief description of the upgrade process.  Important details 
			
		 
		
	
		
			
				 
				 
				can be found in the MariaDB manual, in the Upgrading section. 
				 
				 
				can be found in the MariaDB manual, in the Upgrading section. 
			
		 
		
	
	
		
			
				
					
					
					
						
							 
						 
					
				 
				@ -65,8 +66,8 @@ HERE 
			
		 
		
	
		
			
				 
				 
				  fi  
				 
				 
				  fi  
			
		 
		
	
		
			
				 
				 
				fi  
				 
				 
				fi  
			
		 
		
	
		
			
				 
				 
				
 
				 
				 
				
 
			
		 
		
	
		
			
				 
				 
				# Create a MySQL  user and group. Do not report any problems if it already exists.  
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				# Create a MariaDB  user and group. Do not report any problems if it already exists.  
			
		 
		
	
		
			
				 
				 
				groupadd -r %{ mysqld_group}  2> /dev/null ||  true 
				 
				 
				groupadd -r %{ mysqld_group}  2> /dev/null ||  true 
			
		 
		
	
		
			
				 
				 
				useradd -M -r --home %{ mysqldatadir}  --shell /sbin/nologin --comment "MySQL  server"  --gid %{ mysqld_group}  %{ mysqld_user}  2> /dev/null ||  true 
				 
				 
				 
			
		 
		
	
		
			
				 
				 
				 
				 
				 
				useradd -M -r --home %{ mysqldatadir}  --shell /sbin/nologin --comment "MariaDB  server"  --gid %{ mysqld_group}  %{ mysqld_user}  2> /dev/null ||  true 
			
		 
		
	
		
			
				 
				 
				# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)  
				 
				 
				# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)  
			
		 
		
	
		
			
				 
				 
				usermod --gid %{ mysqld_group}  %{ mysqld_user}  2> /dev/null ||  true 
				 
				 
				usermod --gid %{ mysqld_group}  %{ mysqld_user}  2> /dev/null ||  true