Section 3. Setting up the bot database(s)

Step 1. MySQL database/user creation

  1. Create MySQL database(s)/user(s) for the bot
  1. Start mysql client: see step 4 for password

sudo mysql -uUSER -pPASSWORD

i.e.

sudo mysql -uroot -pmysql411

  1. Create the bot database(s)

CREATE DATABASE bot;

CREATE DATABASE testbot;

  1. Create users for the bot database(s)

GRANT ALL ON SomeDatabaseName.* TO 'SomeUserName'@'SomeHostName' IDENTIFIED BY 'SomePassword';

i.e.

GRANT ALL ON bots.* TO 'bots'@'localhost' IDENTIFIED BY 'bots411';

GRANT ALL ON testbot.* TO 'testbot'@'localhost' IDENTIFIED BY 'bots411';

  1. Grant extra user permissions

This adds needed permissions to the account you just created.

GRANT FILE ON *.* TO 'SomeUserName'@'SomeHostName';

i.e.

GRANT FILE ON *.* TO 'bots'@'localhost';

GRANT FILE ON *.* TO 'testbot'@'localhost';

  1. Close the mysql session
exit