LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 04-30-2005, 07:59 AM   #1
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Rep: Reputation: 15
fresh install of mysql but...


i have a fresh install of freebsd 5.3; no errors and the cvsupdate has been done with no resulting errors.

i switch to and did a "cd /usr/ports/databases/mysql50-server"
i then did "make"
i then did "make install"

i rebooted the machine

i then tried to:
"mysqladmin -u root password mynewpswd"

it returned:

connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket: '/tmp/mysql.sock' (61)
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exist!

Well...
i did a where is on mysqld and it does not exist
and
'/tmp/mysql.sock' does exist.

i then went to mysql docs and could not find a reference to this kind of problem.

any idea?

thanks
 
Old 04-30-2005, 08:55 AM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Try: mysqld_safe
 
Old 04-30-2005, 09:14 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Maybe mysql is not running, check on how to enable services in the FeeBSD handbook.
 
Old 04-30-2005, 10:57 AM   #4
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Original Poster
Rep: Reputation: 15
when i run mysqld_safe it returns

Starting mysqlddaemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/myhostname.pid
050430 11:36:27 mysqld ended

i also tried
http://www.linuxquestions.org/questi...hreadid=313548

there is an err file in /var/db/mysql stating that mysqld does not have sufficent rights. the entire install has been done through the root id so how can this be possible unless the install process is flawed.

thanks!
 
Old 04-30-2005, 12:08 PM   #5
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
OK, I was hoping to avoid the big answer.

You need to create the default database files. The command to do this mysql_install_db.
If you are planning to run mysql as mysql user, which is what you must do, for security reasons,
if the is no mysql user/group do as root
Code:
groupadd mysql
Code:
useradd -g mysql mysql
and then log in as mysql like this:
as root do
Code:
 su mysql
and type the above command (mysql_install_db).

Hope it helps
 
Old 04-30-2005, 12:54 PM   #6
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Original Poster
Rep: Reputation: 15
no go.

groupadd or useradd commands exist (my version is FreeBSD 5.3)

the mysql install did create mysql for groups and users

mysql_install_db did create the database files in folder /var/db/mysql/mysql but mysqld_safe still does not start mysqld same errors as before.

its very confusing.

thanks
 
Old 04-30-2005, 01:08 PM   #7
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
did you do mysql_install_db as mysql user as I suggested you?
Because if you have executed this as root the permissions will be root.root and mysql won't be able to access them.
If you did this go and change the ownership of /var/db/mysql/mysql directory and all the files under this directory to mysql.mysql
 
Old 04-30-2005, 01:15 PM   #8
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Original Poster
Rep: Reputation: 15
it says the account is unavailable.

oh well...

going out of town - i'll check back sunday night

thanks everyone!
 
Old 05-02-2005, 07:07 AM   #9
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Original Poster
Rep: Reputation: 15
Day Two.

I'm back in town now.

REVIEWING NOTES......

hmmmmm.......

ok...just for the PURE fun of it i reloaded freebsd and updated the ports

i also created my id and mysql (and associated grps)

SO...i am suppose to install mysql as the msql user and create the DBs in the same manner (IF i want mysql to manage them). right? how about other apps like Apache 2 and PHP for that matter? what id should be used to install them?

thanks
 
Old 05-02-2005, 07:23 AM   #10
bshearer
Member
 
Registered: Apr 2005
Location: a little Forest in Virginia
Distribution: FreeBSD 5.3
Posts: 44

Original Poster
Rep: Reputation: 15
to install mysql should i

1. login as mysql and attempt to install mysql?

or

2. login as mysql and then su to root and do the install?

or

3. login as root and then su to mysql and then do the install?
 
Old 05-11-2005, 03:36 PM   #11
alantis13
LQ Newbie
 
Registered: May 2005
Posts: 18

Rep: Reputation: 0
sockstat -4 if 3306 is in the results then mysql is running if not
did it load on startup no? did you put mysql_enable="YES" in your rc.conf?
 
Old 05-13-2005, 10:56 PM   #12
danielanson
Member
 
Registered: May 2005
Location: San Antonio, TX
Distribution: OpenBSD 3.7
Posts: 76

Rep: Reputation: 15
Question

Is the mysql installation chrooted on FreeBSD? If so, you need to modify the conf file to put the socket it in the jail. Maybe that helps.
 
Old 07-20-2005, 09:56 PM   #13
Spleeze
LQ Newbie
 
Registered: Mar 2005
Posts: 8

Rep: Reputation: 0
I'm having this EXACT same problem with freebsd 5.4

any pointers would be greatly appreciated, there arent many tutorials on the net, boo
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting MySQL on fresh Slack install subnet_rx Slackware 7 06-26-2004 04:44 PM
Cannot log into fresh install of MySQL. Please advise. jdruin Linux - Software 3 06-22-2004 10:52 PM
fresh install (fresh headache) powadha Slackware 2 03-06-2004 01:03 PM
config. of mysql on fresh redhat 9 install? unclean Linux - Newbie 3 01-31-2004 09:08 AM
How to configure mysql on a fresh redhat9 install? unclean Linux - Software 0 01-30-2004 03:42 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration