Jump to content

FeministWiki:Server setup: Difference between revisions

Line 444: Line 444:
If the versions of MariaDB on the old and new server are compatible enough, you might be able to dump the {{C|mysql.user}} table and import it on the new server, but it's safer to recreate the users from scratch.  To do so, run this on the new server:
If the versions of MariaDB on the old and new server are compatible enough, you might be able to dump the {{C|mysql.user}} table and import it on the new server, but it's safer to recreate the users from scratch.  To do so, run this on the new server:


/root/bin/sql << EOF
/root/bin/sql << EOF
create user blogs@localhost identified by '$(cat ~/pwd/mysql-blogs)';
create user 'feministblogs'@localhost identified by '$(cat ~/pwd/mariadb-feministblogs)';
create user feministfiles@localhost identified by '$(cat ~/pwd/mysql-files)';
create user 'feministfiles'@localhost identified by '$(cat ~/pwd/mariadb-feministfiles)';
create user feministforum@localhost identified by '$(cat ~/pwd/mysql-forum)';
create user 'feministforum'@localhost identified by '$(cat ~/pwd/mariadb-feministforum)';
create user feministmail@localhost identified by '$(cat ~/pwd/mysql-mail)';
create user 'feministmail'@localhost identified by '$(cat ~/pwd/mariadb-feministmail)';
create user feministwiki@localhost identified by '$(cat ~/pwd/mysql-wiki)';
create user 'feministwiki'@localhost identified by '$(cat ~/pwd/mariadb-feministwiki)';
create user fff@localhost identified by '$(cat ~/pwd/mysql-fff)';
create user 'fff'@localhost identified by '$(cat ~/pwd/mariadb-fff)';
EOF
EOF


Now grant them access to their corresponding databases.  Remember that this has to be done '''after''' the databases have been copied over:
Now grant them access to their corresponding databases.  Remember that this has to be done '''after''' the databases have been copied over: