[TriLUG] Broken MySQL Update ( MariaDB replaced it )

Ken M via TriLUG trilug at trilug.org
Mon Jul 3 07:20:01 EDT 2017


To add an after the fact item on this. Change you apt configuration to track the named release and not stable. The Maria db switch indicates to me they moved up to the recently released stretch. As much as Debian is rock solid and upgrading in place is typically painless... a move between major releases is not something that should have been done casually.

Sent from my iPad

> On Jul 2, 2017, at 10:07 PM, Alan Porter via TriLUG <trilug at trilug.org> wrote:
> 
> 
>> On the other hand, could I roll back and replace MariaDB with MySQL,
>> or am I asking for Database Version trouble?
> 
> Step 1 - do a "mysqldump" (or Maria equivalent) [1].  That will export your data to a plain text format.
> 
> After that, I would doubt the changes between the systems would be significant enough that you at least could not re-import the data from the SQL dump.
> 
> Alan
> 
> 
> 
> 
> [1] I do it like this:
> 
> #!/bin/bash
> directory="/root/backup/mysql"
> 
> # Do not store passwords in this script.  See <http://stackoverflow.com/questions/20751352/>
> # Store them using `mysql_config_editor set --login-path=backup --host=localhost --user=backup --password`
> # and use them with `--login-path=backup`
> if [ ! -d $directory ] ; then
>   mkdir -p $directory
> fi
> cd $directory
> 
> # ONE BIG FILE
> mysqldump --login-path=backup --all-databases --single-transaction | gzip > mysqldump.sql.gz
> 
> # MANY SMALL FILES
> databases=$(mysql --login-path=backup --skip-column-names -e 'show databases ;' )
> for db in $databases ; do
>   [[ $db == 'information_schema' ]] && continue
>   [[ $db == 'performance_schema' ]] && continue
>   [[ $db == 'mysql' ]] && continue
>   [[ $db == 'sys' ]] && continue
>   mysqldump --login-path=backup --databases $db --single-transaction | gzip > $db.sql.gz
>   chmod go-wrx $directory/$db.sql.gz
> done
> 
> 
> 
> -- 
> This message was sent to: Ken M. <ken at mack-z.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web    : https://www.trilug.org/mailman/options/trilug/ken%40mack-z.com
> Welcome to TriLUG: http://trilug.org/welcome


More information about the TriLUG mailing list