pavement

Mysql 5.0, installing

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m (Mysql installation guide moved to Mysql 5.0, installing)
(Creating the root password)
Line 30: Line 30:
 
  # mysqladmin -u root password <i>yourpass</i>
 
  # mysqladmin -u root password <i>yourpass</i>
  
Note: If this command returns "command not found", type "rehash" in the CLI:
+
Note: If this command returns "command not found", type "rehash" in the CLI (if using C shell) :
  
 
  # rehash
 
  # rehash

Revision as of 11:31, 5 March 2007

Mysql.jpg

Contents

Installation from ports

# su
# cd /usr/ports/databases/mysql50-server
# make install clean
# mysql_install_db
# chown -R mysql /var/db/mysql/
# chgrp -R mysql /var/db/mysql/

Start MySQL

... From command:

# /usr/local/bin/mysqld_safe -user=mysql &

.. Or a handy pre-made script:

# /usr/local/etc/rc.d/mysql-server.sh

Starting MySQL on system boot

# echo 'mysql_enable="YES"' >> /etc/rc.conf

Creating the root password

To set the root password, replace "yourpass" with your desired password:

# mysqladmin -u root password yourpass

Note: If this command returns "command not found", type "rehash" in the CLI (if using C shell) :

# rehash

Final Notes

Job done! You now have MySQL installed and running. Give yourself a pat on the back!

Personal tools