Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

MySQL startovanje

[es] :: BSD :: MySQL startovanje

[ Pregleda: 2294 | Odgovora: 18 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon MySQL startovanje31.08.2006. u 14:19

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?
31.08.2006. u 14:19 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje01.09.2006. u 14:33
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]
int rand(void);

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

Upali lampicu — koristi Jabber!
01.09.2006. u 14:33 

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon Re: MySQL startovanje01.09.2006. u 14:57
[mysqld]
socket =/tmp/mysql.sock

[client]
socket=/tmp/mysql.sock
user=root
host=localhost
password=test
01.09.2006. u 14:57 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje01.09.2006. u 16:43
šta kaže mysqld kad ga startuješ?
int rand(void);

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

Upali lampicu — koristi Jabber!
01.09.2006. u 16:43 

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon Re: MySQL startovanje01.09.2006. u 17:44
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
01.09.2006. u 17:44 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje01.09.2006. u 17:50
Probaj da startujes mysqld sa

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

int rand(void);

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

Upali lampicu — koristi Jabber!
01.09.2006. u 17:50 

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon Re: MySQL startovanje01.09.2006. u 18:11
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 ...
01.09.2006. u 18:11 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje01.09.2006. u 18:22
Proveri da li ga je zaista podigao

# ps axw|grep mysql

int rand(void);

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

Upali lampicu — koristi Jabber!
01.09.2006. u 18:22 

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon Re: MySQL startovanje01.09.2006. u 18:39
93319 p0 RL+ 0:00.00 grep mysql (bash)


valjda da? :)
01.09.2006. u 18:39 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje01.09.2006. u 20:15
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.
int rand(void);

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

Upali lampicu — koristi Jabber!
01.09.2006. u 20:15 

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon Re: MySQL startovanje01.09.2006. u 20:52
Code:
/usr/local/etc/rc.d/mysql: Can't open /usr/local/etc/rc.d/mysql: No such file or directory


hah :S
01.09.2006. u 20:52 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje01.09.2006. u 21:03
Sorry, moja greška

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

int rand(void);

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

Upali lampicu — koristi Jabber!
01.09.2006. u 21:03 

Rehash
Marko Milenovic
System administrator
Beograd

Član broj: 91952
Poruke: 21
*.dynamic.sbb.co.yu.

Jabber: nightweaver@geekchix.org
ICQ: 64130037
Sajt: www.bsd-srbija.org


Profil

icon Re: MySQL startovanje01.09.2006. u 21:56
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.;)

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
01.09.2006. u 21:56 

Vladimir Micovic
Hosting d.o.o.
Srbija/Beograd/Vozdovac

Član broj: 163
Poruke: 362
*.air.tehnicom.net.

ICQ: 36919012


Profil

icon Re: MySQL startovanje02.09.2006. u 05:08
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 ;)

02.09.2006. u 05:08 

Rehash
Marko Milenovic
System administrator
Beograd

Član broj: 91952
Poruke: 21
*.dynamic.sbb.co.yu.

Jabber: nightweaver@geekchix.org
ICQ: 64130037
Sajt: www.bsd-srbija.org


Profil

icon Re: MySQL startovanje02.09.2006. u 10:57
Nema na cemu. Problem je u dozvolama nad mysql DIR-om. Dokle god je vlasnik root nece se startovati server.
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
02.09.2006. u 10:57 

random
Vladimir Vrzić
Senior Software Engineer, Vast.com
Stari Cerak

Tehnički konsultant
Član broj: 85
Poruke: 3843
*.eunet.yu.

Sajt: www.last.fm/user/vrza


Profil

icon Re: MySQL startovanje02.09.2006. u 14:06
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).
int rand(void);

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

Upali lampicu — koristi Jabber!
02.09.2006. u 14:06 

Rehash
Marko Milenovic
System administrator
Beograd

Član broj: 91952
Poruke: 21
*.dynamic.sbb.co.yu.

Jabber: nightweaver@geekchix.org
ICQ: 64130037
Sajt: www.bsd-srbija.org


Profil

icon Re: MySQL startovanje02.09.2006. u 20:44
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.:)
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
02.09.2006. u 20:44 

m.aleks
Aleksandar Milošević
Beograd

Član broj: 13474
Poruke: 23
*.smin.sezampro.yu.



Profil

icon Re: MySQL startovanje18.10.2006. u 11:23
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"






--
Cancel my subscription to the resurrection
18.10.2006. u 11:23 

Sir_Oliver
Milan bre
Beograd

Član broj: 2557
Poruke: 261
*.ADSL.neobee.net.

ICQ: 52084451


Profil

icon Re: MySQL startovanje19.02.2007. u 19:04
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'
bolje biti bogat nego ne biti
19.02.2007. u 19:04 

[es] :: BSD :: MySQL startovanje

[ Pregleda: 2294 | Odgovora: 18 ]

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.