MySQL Configuration


NOTICE: This guide does not walk through how to install and configure MySQL. Nor does it discuss firewalls or the creation of schemas or accounts. This guide simply indicates how to configure PhantomBot to work with an existing MySQL schema. Keep in mind that MySQL may be slightly slower than SQLite in some operations. MySQL support has been added for those that want to easily administrate a database remotely. In interest of performance, it is suggested that PhantomBot and MySQL reside on the same server. PhantomBot will automatically import your old SQLite database to MySQL.

To configure PhantomBot to utilize an existing MySQL schema and user account, the following configuration is required in the botlogin.txt file:

datastore=mysqlstore Note that datastore is already defined in your configuration file, but will more than likely have no value assigned to it.

mysqlhost=mysql_host Set this to the host that you are running MySQL on. The localhost will be used for a local installation. This could be a hostname or an IP address.

mysqlport=port_number This is the port that MySQL is running on. If running on the default port, leave this blank and it will connect to the default port.

mysqlname=schema_name This is the schema that PhantomBot can use to create tables and store data in.

mysqluser=user_name This is the user that was created that has the neccessary privileges to create and delete data in the schema created for PhantomBot.

mysqlpass=user_password The password assigned to the user.

You can also type mysqlsetup in the bot console to do this.

Here is a sample configuration:

1 Like
Importing to MySQL