Configuring MySQL
Config files
/etc/my.cnf, ~/.my.cnf
Configuration Information
There are several default configurations file available in
/usr/share/mysql which you can use.
cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
We can now install a database and change the ownership to the
unprivileged user and group.
mysql_install_db &&
chown -R mysql:mysql /var/lib/mysql
Further configuration requires that the mysql server be running:
mysqld_safe --user=mysql 2>&1 >/dev/null &
A default installation does not setup a password for the administrator
so here we will set one. Replace [new-password]
with your own.
mysqladmin -u root password [new-password]
Now that we are done with the configuration of the server, we can
shut it down.
mysqladmin -p shutdown
Install /etc/rc.d/init.d/mysql
init script included in the package.
make install-mysql