pavement

Mysql 5.0, installing

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Installation from ports: chown -R user:group is shorter than using chgrp)
m (Reverted edits by 188.33.200.38 (Talk); changed back to last version by 79.2.222.218)
 
Line 7: Line 7:
 
  # make install clean
 
  # make install clean
 
  # mysql_install_db
 
  # mysql_install_db
  # chown -R mysql:mysql /var/db/mysql/
+
  # chown -R mysql /var/db/mysql/
 +
# chgrp -R mysql /var/db/mysql/
  
 
== Start MySQL ==
 
== Start MySQL ==

Latest revision as of 16:11, 24 September 2009

Mysql.jpg

Contents

[edit] 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/

[edit] Start MySQL

... From command:

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

.. Or a handy pre-made script:

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

[edit] Starting MySQL on system boot

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

[edit] 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

[edit] Final Notes

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

Personal tools