• 18 odgovora
  • 6.534 pregleda
MySQL startovanje 31.08.2006. u 14:19 · pre 245 meseci #1
Posle cele notji googlanja i pokusavanja da provalim sta me zeza, morao sam dap ostavim pitanje :)
Naime, install sam sql i sad nece da mi se startuje ...

Code:

ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)

(dodavao, brisao, menjao (dozvole i td) taj mysql.sock i nista)

I vrti tako celu noc u krug ...
u pitanju je fbsd 6.1


Ima neko predstave sta da radim?
Re: MySQL startovanje 01.09.2006. u 14:33 · pre 245 meseci #2
Da li si uopšte pokrenuo mysql daemon? Ako jesi, kako ti izgleda my.cnf?

[Ovu poruku je menjao random dana 01.09.2006. u 15:45 GMT+1]
Potpis
int rand(void);

Those who do not understand Unix are condemned to reinvent it, poorly.

Upali lampicu — koristi Jabber!
Re: MySQL startovanje 01.09.2006. u 14:57 · pre 245 meseci #3
[mysqld]
socket =/tmp/mysql.sock

[client]
socket=/tmp/mysql.sock
user=root
host=localhost
password=test
Re: MySQL startovanje 01.09.2006. u 17:44 · pre 245 meseci #5
Code:

Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
060901 18:34:45 Aborting

060901 18:34:45 /usr/local/libexec/mysqld: Shutdown Complete



A kad probam da se ulogujem kao sql user kaze da "This account is currently not available."


:s
Re: MySQL startovanje 01.09.2006. u 18:11 · pre 245 meseci #7
meni je ovako:
Code:
/usr/local/etc/rc.d/mysql-server start


i samo prodje, ono kao, uaplio je, nista ne pojavi, samo prebaci liniju ...
Re: MySQL startovanje 01.09.2006. u 18:39 · pre 245 meseci #9
93319 p0 RL+ 0:00.00 grep mysql (bash)


valjda da? :)
Re: MySQL startovanje 01.09.2006. u 20:15 · pre 245 meseci #10
Ne, to je sama grep komanda (uporedi ps axw|grep [m]ysql). Kao što se i činilo, nije ti uopšte podignut MySQL servis. Probaj sa

# sh -x /usr/local/etc/rc.d/mysql start


pa ćemo videti zašto neće.
Potpis
int rand(void);

Those who do not understand Unix are condemned to reinvent it, poorly.

Upali lampicu — koristi Jabber!
Re: MySQL startovanje 01.09.2006. u 20:52 · pre 245 meseci #11
Code:
/usr/local/etc/rc.d/mysql: Can't open /usr/local/etc/rc.d/mysql: No such file or directory


hah :S
Re: MySQL startovanje 01.09.2006. u 21:56 · pre 245 meseci #13
Probaj ovako:

/usr/local/bin/mysql_install_db

kad odradi sta ima kucaj:

chown -R mysql /var/db/mysql

Pa kucaj samo: mysqld_safe &

To bi trebalo da odradi posao.;)
Potpis
There's no problem so large it can't be solved by killing the user off, deleting their files, closing their account and reporting their REAL earnings to the IRS
Re: MySQL startovanje 02.09.2006. u 05:08 · pre 245 meseci #14
tnx. Rehash, to je zavrsilo stvar ;)
Citat:

95000 p0 S 0:00.02 /bin/sh /usr/local/bin/mysqld_safe
95014 p0 S 0:01.13 /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/mysql --user=mysql --pid-file=/var/db/my
95016 p0 S+ 0:00.01 grep mysql


tnx. i random ;)

Re: MySQL startovanje 02.09.2006. u 10:57 · pre 245 meseci #15
Nema na cemu. Problem je u dozvolama nad mysql DIR-om. Dokle god je vlasnik root nece se startovati server.
Potpis
There's no problem so large it can't be solved by killing the user off, deleting their files, closing their account and reporting their REAL earnings to the IRS
Re: MySQL startovanje 02.09.2006. u 14:06 · pre 245 meseci #16
Hmm, mislim da bi bilo razumno napisati instalacioni skript tako da kad kreira direktorijume postavi vlasništvo i dozvole nad njima.

P.S. Rehash, hvala što si skratio ovu priču :o).
Potpis
int rand(void);

Those who do not understand Unix are condemned to reinvent it, poorly.

Upali lampicu — koristi Jabber!
Re: MySQL startovanje 02.09.2006. u 20:44 · pre 245 meseci #17
Fora je u tome sto nekima sve radi bez ovog sto sam napisao. Dosta dugo smo vodili raspravu na BSD Forums i nisam na kraju video neko logicno objasnjenje zasto u nekim slucajevima sve radi OK. No, preslo mi je u rutinu da na BSD Srbiji i BSD Forums odgovaram na ovo pitanje.:)
Potpis
There's no problem so large it can't be solved by killing the user off, deleting their files, closing their account and reporting their REAL earnings to the IRS
Re: MySQL startovanje 18.10.2006. u 11:23 · pre 243 meseci #18
Da li u /etc/rc.conf imate ...

Code:
 mysql_enable="YES" 


rc.d/mysql-server script napravi sve sto treba.

Code:

#!/bin/sh
#
# $FreeBSD: ports/databases/mysql50-server/files/mysql-server.sh.in,v 1.3 2006/03/07 16:25:00 ale Exp $
#

# PROVIDE: mysql
# REQUIRE: LOGIN
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable mysql:
# mysql_enable (bool):  Set to "NO" by default.
#                       Set it to "YES" to enable MySQL.
# mysql_limits (bool):  Set to "NO" by default.
#                       Set it to yes to run `limits -e -U mysql`
#                       just before mysql starts.
# mysql_dbdir (str):    Default to "/var/db/mysql"
#                       Base database directory.
# mysql_args (str):     Custom additional arguments to be passed
#                       to mysqld_safe (default empty).
#

. /etc/rc.subr

name="mysql"
rcvar=`set_rcvar`

load_rc_config $name

: ${mysql_enable="NO"}
: ${mysql_limits="NO"}
: ${mysql_dbdir="/var/db/mysql"}
: ${mysql_args=""}

mysql_user="mysql"
mysql_limits_args="-e -U ${mysql_user}"
pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
command="/usr/local/bin/mysqld_safe"
command_args="--defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} 
                      --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args} > /dev/null &"
procname="/usr/local/libexec/mysqld"
start_precmd="${name}_prestart"
mysql_install_db="/usr/local/bin/mysql_install_db"
mysql_install_db_args="--ldata=${mysql_dbdir}"

mysql_create_auth_tables()
{
        eval $mysql_install_db $mysql_install_db_args >/dev/null
        [ $? -eq 0 ] && chown -R ${mysql_user}:${mysql_user} ${mysql_dbdir}
}

mysql_prestart()
{
        if [ ! -d "${mysql_dbdir}/mysql/." ]; then
                mysql_create_auth_tables || return 1
        fi
        if checkyesno mysql_limits; then
                eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null
        else
                return 0
        fi
}

run_rc_command "$1"





Potpis
--
Cancel my subscription to the resurrection
Re: MySQL startovanje 19.02.2007. u 19:04 · pre 239 meseci #19
Citat:
random: Hmm, mislim da bi bilo razumno napisati instalacioni skript tako da kad kreira direktorijume postavi vlasništvo i dozvole nad njima.

P.S. Rehash, hvala što si skratio ovu priču :o).


Mozda kasno saljem komentar na temu, ali to i jeste moguce odraditi: 'mysql_install_db --user=mysql'
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme