|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
Mysql 5.1 install on Freebsd 7 64 bit
This is not how I did it and solved the problems I had.
Installed it from ports: Code:
cd /usr/ports/databases/mysql51-server/ make install clean Install went fine but : I could not start mysql server because the database could not be located and neither could I find the test and mysql databases which mysql installs . Also could not find the datadir it was not created. as i just ran make install clean and did not configure with the optional --datadir=<dbdir>. But still there should be a default datadir installed somewhere but despite my best efforts example : find / -name mysql -print to find it I could not. So i belive if you install mysql 5.1 from ports i.e 64 bit version than it does not create a default datadir unless you specify. Usually the datadir is /var/db/mysql but I think nowadays it has changed to somewhere in /usr/local others can help out here. Solutions: Created a new directory in /var/db called mysql To make the directory cd /var/db than mkdir dirname Or in webmin use the filemanager to create on. Or if you use a ftp client do it there http://www.computerhope.com/unix/umkdir.htm Next give the new user and group "mysql" created during the install full control over the directory you created Code:
chown -R mysql /var/db/mysql/ chgrp -R mysql /var/db/mysql/ cd to mysql basedir [ example /usr/local/bin ] that would be where a file called mysql_install_db exists Run Code:
mysql_install_db --user=mysql Start mysql with command Code:
(/usr/local/bin/safe_mysqld || /usr/local/bin/mysqld_safe) &
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 Last edited by ijk; 23rd July 2008 at 11:36 AM. |
|
||||
You always need to run mysql_install_db after first installing MySQL ... Nothing new there ...
Quote:
From /ports/databases/mysql51-server/files/mysql-server.sh.in Code:
# mysql_dbdir (str): Default to "/var/db/mysql" # Base database directory. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Guy trying to install FreeBSD | chainofcommand02 | FreeBSD Installation and Upgrading | 2 | 28th October 2008 02:29 PM |
MySQL High Availability FreeBSD Cluster | businessgeeks | FreeBSD General | 7 | 24th June 2008 07:12 PM |
MySQL 5.1 install - daemon crashes | zeltus | FreeBSD General | 1 | 25th May 2008 08:39 AM |
How to compile MySQL in FreeBSD 7? | invarbrass | FreeBSD General | 1 | 23rd May 2008 06:25 AM |
mysql on freebsd 7 | nijikon | FreeBSD General | 0 | 20th May 2008 12:47 PM |