How can I access MySQL on my JumpBox?

Locally from the JumpBox

You can access MySQL locally by registering, then SSHing into your JumpBox as the admin user and running the command:

sudo mysql --defaults-file=/etc/mysql/debian.cnf 

This will connect you as the 'debian-sys-maint' user, which is ALMOST as good as root. If you truly need to connect as the root MySQL user, get the root password out of the debian defaults file:

sudo grep password /etc/mysql/debian.cnf

and use that password when connecting as follows:

 mysql -u root -p

Over the Network

For security reasons, the MySQL server installed on the JumpBox is not accessible from remote machines. These instructions show you how to change this yourself. Please understand that this may be a bad idea if your JumpBox is not on a secure network, so proceed with caution.

Register then SSH into your JumpBox and run the following command to edit the MySQL configuration file:

sudo nano /etc/mysql/my.cnf

Find the "bind-address" line and replace 127.0.0.1 with 0.0.0.0

#bind-address           = 127.0.0.1
bind-address            = 0.0.0.0

Now restart MySQL and it should be accessible remotely, but before that is useful, we need to grant access to modify a database to a remote user

GRANT ALL PRIVILEGES ON mantis.* TO 'root'@'%' IDENTIFIED BY 'secret';

This will enable a user called 'root' on any remote host (that is what the @'%' means) who uses the password 'secret' to do anything (except GRANT privileges) to any table on the mantis database. For details see the MySQL 5.0 documentation on the GRANT command.

Now you can access MySQL remotely, either using a GUI admin tool or a command line too like mysql:

mysql -h JumpBoxIP -u root -p