DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd July 2008
ijk ijk is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 47
Default 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/
Than create the sample database
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
this should create the default mysql databases usually called test and mysql. you can check to see if they are create by going to datadir.

Start mysql with command
Code:
(/usr/local/bin/safe_mysqld || /usr/local/bin/mysqld_safe) &
That got mysql 5.1 runing fine. If I get any errors after runing scripts I will post them here over the course of the next few weeks.
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5

Last edited by ijk; 23rd July 2008 at 11:36 AM.
Reply With Quote
  #2   (View Single Post)  
Old 23rd July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin Tournoij
Tcpdump Spy
 
Join Date: Apr 2008
Location: Ireland
Posts: 2,245
Default

You always need to run mysql_install_db after first installing MySQL ... Nothing new there ...

Quote:
Usually the datadir is /var/db/mysql but I think nowadays it has changed to somewhere in /usr/local others can help out here.
Bleh?

From /ports/databases/mysql51-server/files/mysql-server.sh.in

Code:
# mysql_dbdir (str):	Default to "/var/db/mysql"
#			Base database directory.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 12:23 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick