Databases Reference
In-Depth Information
Figure 2-19. Verifying that the mysql group exists
$
sudo niutil -createprop / /groups/mysql gid 74
$
sudo niutil -createprop / /users/mysql uid 74
Finally, associate the
mysql
user with the
mysql
group:
$
sudo niutil -createprop / /users/mysql gid 74
When you're sure the correct user and group exist, you have to initialize the MySQL
databases. First, change to the MySQL base directory:
$
cd /usr/local/mysql
Then run the
mysql_install_db
script from the
scripts
directory. The
user
option as-
signs ownership of the MySQL datafiles and folders to the specified user—here to the
system
mysql
account:
$
sudo scripts/mysql_install_db --user=mysql