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 'feministblogs'@localhost identified by '$(cat ~/pwd/mariadb-feministblogs)';
    create user 'feministblogs'@localhost identified by '$(cat ~/pwd/mariadb-feministblogs)';
    create user 'feministfiles'@localhost identified by '$(cat ~/pwd/mariadb-feministfiles)';
    create user 'feministfiles'@localhost identified by '$(cat ~/pwd/mariadb-feministfiles)';
    create user 'feministforum'@localhost identified by '$(cat ~/pwd/mariadb-feministforum)';
    create user 'feministforum'@localhost identified by '$(cat ~/pwd/mariadb-feministforum)';
    create user 'feministmail'@localhost identified by '$(cat ~/pwd/mariadb-feministmail)';
    create user 'feministmail'@localhost identified by '$(cat ~/pwd/mariadb-feministmail)';
    create user 'feministwiki'@localhost identified by '$(cat ~/pwd/mariadb-feministwiki)';
    create user 'feministwiki'@localhost identified by '$(cat ~/pwd/mariadb-feministwiki)';
    create user 'fff'@localhost identified by '$(cat ~/pwd/mariadb-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:


      /root/bin/sql << EOF
      /root/bin/sql << EOF
      grant all on blogs.* to blogs@localhost;
      grant all on feministblogs.* to feministblogs@localhost;
      grant all on feministfiles.* to feministfiles@localhost;
      grant all on feministfiles.* to feministfiles@localhost;
      grant all on feministforum.* to feministforum@localhost;
      grant all on feministforum.* to feministforum@localhost;