Note that the department now has a central, departmentally managed SQL server that you may use. Just send email to staff@cs.umd.edu to ask about having a database set up for you on this server.
Or, if you prefer to set up and run your own mysql server, continue with the instructions below...
/tmp
is not a good
place for this, as it could be deleted at anytime when the machine
needs space.
.my.cnf file in the base of your home
directory (${HOME}/.my.cnf). Next fill it with the
appropriate information as in the example below, but make sure that the
datadir is the directory you picked at the start of this
document. Also make sure that the socket file that you pick is
writeable by you.
| [derek@nobby
~]$ cat .my.cnf [client] socket=/export/home/derek/.mysql.sock [mysqld] datadir=/export/home/derek/mysql socket=/export/home/derek/.mysql.sock |
| [derek@nobby
~]$ /usr/local/bin/mysql_install_db Preparing db table Preparing host table Preparing func table Preparing tables_priv table Preparing colums_priv table Installing all prepared tables <snip> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /usr/local/mysql-4.0.15/bin/mysqladmin -u root password 'new-password' <snip> You can start the MySQL daemon with: cd /usr/local/mysql-4.0.15 ; /usr/local/mysql-4.0.15/bin/mysqld_safe & <snip> |
/usr/local/sbin/mysqld &
(do not use mysqld_safe line from above)
| [derek@nobby
~]$ /usr/local/sbin/mysqld & [1] 22403 00628 21:34:32 InnoDB: Started /usr/local/sbin/mysqld: ready for connections. Version: '4.0.17' socket: '/export/home/derek/.mysql.sock' port: 3306 |
Then finally set a root password with,
/usr/local/bin/mysqladmin -u root password 'somepassword'