Apr 3, 2018, 5:13 AM

The only reason MySQL even comes into this discussion is because MediaWiki talks to it.

You have to create 1 schema for each wiki, in MySQL. Period.

mysql --user=root -p
Enter Password: (do that now)

Your prompt changes to mysql>

mysql> CREATE DATABASE wiki00;

mysql> GRANT ALL PRIVILEGES ON wiki00.* to 'username0'@'localhost' IDENTIFIED BY 'someCleverPassword';

mysql> GRANT ALL PRIVILEGES ON wiki00.* to 'username0'@'127.0.0.1' IDENTIFIED BY 'someCleverPassword';

127.0.0.1 is a TCP loopback address. localhost is a named pipe. They're only synonymous or even vaguely similar when you're dicking around with your webbrowser and the browser behaves the same no matter which one you type in. That speaks to the amount of work the browser dev team put in.

MySQL, as a high security platform, is engineered to treat 'localhost' and '127.0.0.1' as the two different connection sources they really are.

So what you're doing in these MySQL queries is granting access to 'username0' when it connects from either source/protocol.

mysql> flush privileges;

What you just did is create a MySQL schema (also referred to as an individual database, but that's a horrible term to use because MySQL is the database and calling individual schemas 'databases' confuses newbies). After that you gave every imaginable permission (READ/WRITE/UPDATE/DELETE/ETC) to your new user. In newer MySQL versions, these commands alone should also create the specified user@site definition if it doesn't exist.

mysql> quit

This returns you to the linux shell.