pavement

Mysql 5.0, installing

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m (Mysql installation guide moved to Mysql 5.0, installing)
m (Reverted edits by 188.33.200.38 (Talk); changed back to last version by 79.2.222.218)
 
(3 intermediate revisions by 3 users not shown)
Line 18: Line 18:
 
.. Or a handy pre-made script:
 
.. Or a handy pre-made script:
  
  # /usr/local/etc/rc.d/mysql-server.sh
+
  # /usr/local/etc/rc.d/mysql-server forcestart
  
 
== Starting MySQL on system boot ==
 
== Starting MySQL on system boot ==
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

Latest revision as of 17: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