maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Installed mysql server and client need help starting service (https://talk.maemo.org/showthread.php?t=65548)

extendedping 2010-11-13 02:30

Installed mysql server and client need help starting service
 
I found it via apt-cache search and said what the heck I got this to learn linux. well I installed but ps -ef does not show it running. which mysqld shows /usr/sbin/mysqld I don't know how to start it. is this where I need to know how to create a script in /etc/init.d for starting and stopping mysqld? I really am a bit out of my league here...but then again that is the reason I got this phone.

Any help appreciated. specifically I am trying to figure out how to start mysqld and also where I can make sure it does not start when the device starts (so as not to use more power). Btw I know I could install easy debian, but I am trying to linux up the maemo as much as possible...

dave1010 2010-11-13 08:09

Re: Installed mysql server and client need help starting service
 
As mysqld is in your path, you can run it by just typing "mysqld" in xterm.You should be able to stop it with a ctrl+c, or if not then "killall mysqld" from another xterm. Ideally there should be a script in /etc/init.d/mysqld, but it will work fine without. It wont't run in boot unless it's in /etc/rc2.d/.

You could copy and edit the one from http://docdb.fnal.gov/doc/mysqld.html. I guess all you really need is the PID locking.

I'd probably use a Queen BeeCon Widget to start and stop it.

farmatito 2010-11-13 08:22

Re: Installed mysql server and client need help starting service
 
gain root with su or sudo or rootsh or "ssh root@localhost"

and then

/etc/init.d/mysql start

/etc/init.d/mysql stop

That's it.

michaelxy 2010-11-13 08:38

Re: Installed mysql server and client need help starting service
 
But look in /etc/rc2.d/*mysql - that mysql will not start automaticaly - because it can take some memory

extendedping 2010-11-14 14:22

Re: Installed mysql server and client need help starting service
 
Ok so here is some output..
1) prove mysql/mysqld are installed and in my path
2) try to run mysql/mysqld commands and associated output
3) show no mysql running and nothing in /etc/rc2.d or /etc/init.d

Thanks....

Nokia-N900:ß# which mysql
/usr/bin/mysql
Nokia-N900:~# which mysqld
/usr/sbin/mysqld
Nokia-N900:~# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Nokia-N900:~# mysqld
101114 9:16:15 InnoDB: Started; log sequence number 0 43655
101114 9:16:15 [ERROR] Can't start server : Bind on unix socket: No such file or directory
101114 9:16:15 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
101114 9:16:15 [ERROR] Aborting

101114 9:16:15 InnoDB: Starting shutdown...
101114 9:16:17 InnoDB: Shutdown completed; log sequence number 0 43655
101114 9:16:17 [Note] mysqld: Shutdown complete

Nokia-N900:~# ps -ef | grep -i *sql*
6653 root 3796 S grep -i *sql*
Nokia-N900:~# ls /etc/rc2.d/*sql*
ls: cannot access /etc/rc2.d/*sql*: No such file or directory
Nokia-N900:~# ls /etc/init.d/*sql*
ls: cannot access /etc/init.d/*sql*: No such file or directory
Nokia-N900:~#

extendedping 2010-11-15 03:45

Re: Installed mysql server and client need help starting service
 
help me please.

kureyon 2010-11-15 06:36

Re: Installed mysql server and client need help starting service
 
Run mysql_install_db in initialise the user accounts
Look over /etc/mysql/my.cnf to see if anything needs changing
Run "mysqld_safe &" to start the server
Run mysql_secure_installation to tighten the security

done

extendedping 2010-11-15 11:12

Re: Installed mysql server and client need help starting service
 
Thanks works fine and quits on "killall mysqld".


All times are GMT. The time now is 14:53.

vBulletin® Version 3.8.8