Working with Databases

Modified: 05 Jan 2015 18:06 UTC

You have probably reached a point where you are rolling with your machine and your databases are churning through lots of data. Now you just need to make sure that you periodically maintain the integrity of your database. The following topics guide you through fine tuning and maintaining a database. 

In this topic:

In this section:

At a Glance

This topic introduces you to topics that guide you in maintaining a SmartMachine database.

About MySQL on a SmartMachine

SmartMachines include MySQL5 as a package install which you can find in /opt/local. If possible, use MySQL5 as it includes many fixes and features not found in MySQL4, especially in replication and clustering.

Regardless of the version, this guide applies to either version.

Accessing a MySQL Database

To log in to your MySQL database, run the following command:

mysql -u root -p

When prompted for a password, use the password specifically for the MySQL user, not the password for the root user. You can find the MySQL user password on the Machine Details page by clicking the SHOW CREDENTIALS button.