Title
Article text.
--
Mike Gore - 2020-09-24
Comments
mouse SVN running on cs-tech1-vm.cs.uwaterloo.ca for testing
- All original accounts are running passwords restored
- The svn data has been restore /var/svn/repo/name of repository goes here it will ask for user and password authentication
Old mouse.cs
- Interesting applicatons
- mysql-server-5.0 mysql-client-5.0 php5-mysql php5-mysqli php5 phpmyadmin apache2 apache2-utils libapache2-mod-php5 libapache2-mod-svn subversion git-svn git-svnmediawiki
- mysql version 5.0
- Databases
- wikidb_vision
- wikidb_digs
- mysql
- Users
Exporting MYSQL 5.0 databases
PASS=DELETED
mysqldump -u root -p$PASS --add-drop-table --all-databases >/mouse-50_databases_all.sql
Exporting MYSQL 5.0 users
PASS=DELETED
mysql -u root -p$PASS --skip-column-names -A -e "SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') AS query FROM mysql.user WHERE user NOT IN ('root','pma','phpmyadmin','debian-sys-maint')" | mysql -u root -p$PASS --skip-column-names -A | sed 's/$/;/g' > /mouse-50_mysql_all_users_sql
mediawiki
- /var/lib/mediawiki/vision/LocalSettings.php
- Settings and account and settings for wikidb_vision
- /var/lib/mediawiki/digs/LocalSettings.php
- Settings and account and settings for wikidb_vision
Updating via 18.04LTS VM
Software
- apt-get install net-tools
- apt-get install mysql-client-5.7 mysql-server-5.7 mediawiki apache2 subversion libapache2-mod-svn git-svn phpmyadmin mediawiki
Importing Databases
#import all databases
PASS=DELETED
mysql -u root -p$PASS --force < /mouse-50_databases_all.sql
Importing Users
# We delete the PASSWORD keyword since 5.7 does not use it
# See https://stackoverflow.com/questions/27256839/mysql-script-to-create-user-and-database-with-hashed-password
sed -i -e "/ PASSWORD//" /mouse-50_mysql_all_users_sql
- Added SELECT User, Host FROM mysql.user; as first line of /mouse-50_mysql_all_users_sql
- Added flush privileges; before every line to */mouse-50_mysql_all_users_sql
Upgrading databases
PASS=DELETED
mysql_upgrade -u root -p$PASS
# Run it again after fixing mysql root user passwword
Exporting MYSQL Database from 18.04 VM
PASS=DELETED
mysqldump -u root -p$PASS --all-databases --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats -
-add-drop-table >/mouse-vm_57_databases_all.sql
Exporting MYSQL Users from 18.04
mysql -u root -p$PASS --skip-column-names -A -e "SELECT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host,''';') AS query FROM m
ysql.user WHERE user NOT IN ('root','pma','phpmyadmin','debian-sys-maint')" | mysql -u root -p$PASS --skip-column-names -A |
sed 's/$/;/g' > /mouse-vm_57_mysql_all_users_sql
Mouse 20.04:TS
Software
- apt-get install net-tools
- apt-get install mysql-client-8.0 mysql-server-8.0 mediawiki apache2 subversion libapache2-mod-svn git-svn phpmyadmin mediawiki
Importing Databases
#import all databases
PASS=DELETED
mysql -u root -p$PASS --force < /mouse-vm_57_databases_all.sql
systemctl restart mysql
Importing Users
# We delete the PASSWORD keyword since 5.7 does not use it
# See https://stackoverflow.com/questions/27256839/mysql-script-to-create-user-and-database-with-hashed-password
sed -i -e "/ PASSWORD//" /mouse-vm_57_mysql_all_users_sql
- Added SELECT User, Host FROM mysql.user; as first line of /mouse-vm_57_mysql_all_users_sql
- Added flush privileges; before every line to */mouse-vm_57_mysql_all_users_sql