FreeBSD 7.2, mysql_install_db script missing

I installed Mysql from ports regularily:
Code:
# cd /usr/ports/databases/mysql51-server
# make install clean

But when I try to issue mysql_install_db, so it can make mysql dir and system databases, it's missing (is it some bug in mysql port?)... I'm new to FreeBSD, please help me, how can I solve this out?
 
Just create the directories, set them correctly in /etc/rc.conf (mysql_dbdir) and start mysql.
 
Did you run [cmd=]rehash[/cmd] or [cmd=]hash -r[/cmd] after installing?
 
When I installed mysql51-server I didn't have to run mysql_install_db.

Just created the datadir, set everything correctly in /etc/rc.conf, started mysql and set a root password for it.
 
thanks... tried with rehash (doesn't work either)...
what directory i need to make and set in /etc/rc.conf?
 
pyc said:
what directory i need to make and set in /etc/rc.conf?

Create a data dir where you want mysql to store the databases.
Set that dir with the variable mysql_dbdir in /etc/rc.conf.

Make sure the directory is owned by mysql:mysql.
 
Note that MySQL uses /var/db/mysql by default. If your databases are already there, there's no need to alter /etc/rc.conf. Normally, you need nothing more than mysql_enable="YES".

[cmd=]ps axww | grep mysql[/cmd] tells you which directories it is using now.
 
funny, when I try to chown mysql dir, I get this:

Code:
#chown -R mysql /var/db/mysql/
chown: mysql: Invalid argument

I guess it's because mysql user does not exist? So user must be made first?
 
I'm pretty sure that the port adds the mysql user by itself.
Code:
mysql:*:88:88:MySQL Daemon:/nonexistent:/sbin/nologin
 
Thank you all for help, in the end I concluded that was an unsuccessful build because I lacked swap memory (trying to make a server out of P1 200 Mhz / 64 MB RAM :) ... and when I raised swap area, it was installed succesfully...
 
Back
Top