HOME

Back to Manual Table of Contents

Passwords in MySQL

If you are looking for information about the password features built into DentOffice, please see the Permissions page.

This section addresses a completely different kind of password. These passwords are not for the office employees, and they have nothing to do with how actual users interact with DentOffice. If you install MySQL as described in the instructions, you will not need to change or set up passwords to get the program working. This section is only for advanced users who, for some reason, require extra security. Even if you do decide to set up passwords, wait until after initial installation on the server so that installation will be as simple as possible. The next section gives a simplified explanation of MySQL passwords followed by very detailed instructions for setting up users and passwords. Most users on small closed networks will not need to set up passwords. A future version of DentOffice might help make the process more user friendly.

Passwords are a feature of MySQL, the database server where all the data tables are stored. Each copy of DentOffice on a workstation in the office is a 'user' and may require a password to allow DentOffice to access the database. To set up passwords, you must at least do two things: 1.Setup the user and password in MySQL. 2. Change the user and password in the Choose Database window to match. A new installation of MySQL on a Windows system will have 4 users already set up. One of the users is localhost.root with no password. That is the user that DentOffice is set to use, but can be changed as follows:

Use Navicat www.navicat.com for $99 or your favorite administration utility. This process is similar if you use phpMyAdmin, or other tools. Set up a new connection using port 3306, root, and no password. Then go to Manage Users. If you change the password for the user 'root@localhost', then you will then have to edit your connection to match.

What users and passwords should be changed? There are pages and pages of information on the MySQL website. Here are the initial users:

@% - Anyone at any computer.
@localhost - Anyone at the local computer.
root@% - root user at any computer.
root@localhost - root user at the local computer.

The root user is a superuser who can do anything. root@localhost has all privileges and no initial password. The important thing to remember is that root@% is a completely different user with it's own password. So, even if you change the password for root@localhost, that still doesn't secure the database from root on any other computer getting access.

The default installation of DentOffice is set up to use root@localhost and/or root@%, depending on which computer you are accessing the database from.

The first thing to do if you are securing the database would be to assign passwords to root@localhost and root@% (probably the same password. Make sure that at least root@localhost has global access and has all privileges enabled. You would then set up a user (perhaps 'opendentaluser@%') with whatever password you wish. The user will have to have all privileges enabled and have access to the opendental database or global access. You will also need to delete the other two users, @%, and @localhost, because that would also allow anyone into the database without a password.

After making your changes to the MySQL database, the DentOffice workstations will no longer have access to the database. Close DentOffice on each workstation and when you open it back up again, it will ask for the user and password in the MySQL Configuration window. Enter the user (eg. opendentaluser) and password (eg. abracadabra) you have just created. If it was running before, and the changes you made cause it to not function anymore, carefully retrace your steps. Make very certain that the user you have set up has all privileges and access to the freedental database. Be aware of the difference between user@% and user@localhost. Double check the privileges and then try again.

The password that you enter into the MySQL Configuration window on each computer is stored locally in a file called FreeDentalConfig.xml which is located in the C:\Program Files\DentOffice\ folder. To keep this password secret, you should also restrict access to this folder on each computer using Windows passwords.