Starting MySQL daemon


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Starting MySQL daemon
# 8  
Old 12-13-2006
yes, that is the rc script to start mysql. just make sure that it's executable by root, (as root issue chmod u+x /usr/local/etc/rc.d/mysql-server or .sh which ever)

then run the script with (start | stop | restart)
# 9  
Old 12-14-2006
As said, I run the script and this is what happens

Code:
[root]# sh /usr/local/ect/rc.d/mysql-server start
Starting mysql.
[mysql]#

This doesn't start the database all it seems to do for me is switch the user to the mysql user as you can see from above. I don't get it, even after starting mysqld with the safe_mysqld command it doesn't stop the mysql database using the shell script and the command stop. Plus from looking at the script it seems that it uses the safe_mysqld command itself. Maybe there is something wrong with the safe_maysqld script.

It also seems the server is progressively getting slower?!?!

Thanks for the help, again.

Last edited by unispace; 12-14-2006 at 05:38 PM..
# 10  
Old 12-14-2006
Could you show the output of ps aux please?
# 11  
Old 12-14-2006
a ps aux would be useful, you should also check the /var/log/messages to see if mysql is trying to start, but can't due to some mis-configuration or corrupted binaries
# 12  
Old 12-14-2006
Here is ps aux, I don't see anything about mysql having problems in /var/log/message. You can see that I tried stopping mysql with the shell script but it is still running. THanks

Code:
USER    PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME COMMAND
root     11 98.4  0.0     0     8  ??  RL    1:00PM 133:44.05 [idle: cpu0]
root      0  0.0  0.0     0     0  ??  WLs   1:00PM   0:00.00 [swapper]
root      1  0.0  0.0   724   360  ??  ILs   1:00PM   0:00.01 /sbin/init --
root      2  0.0  0.0     0     8  ??  DL    1:00PM   0:00.50 [g_event]
root      3  0.0  0.0     0     8  ??  DL    1:00PM   0:00.58 [g_up]
root      4  0.0  0.0     0     8  ??  DL    1:00PM   0:00.60 [g_down]
root      5  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [kqueue taskq]
root      6  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [acpi_task0]
root      7  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [acpi_task1]
root      8  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [acpi_task2]
root      9  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [thread taskq]
root     10  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [ktrace]
root     12  0.0  0.0     0     8  ??  WL    1:00PM   0:07.68 [swi4: clock sio]
root     13  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [swi3: vm]
root     14  0.0  0.0     0     8  ??  WL    1:00PM   0:00.17 [swi1: net]
root     15  0.0  0.0     0     8  ??  DL    1:00PM   0:00.44 [yarrow]
root     16  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [swi2: cambio]
root     17  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [swi6: task queue]
root     18  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [swi6: +]
root     19  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [swi5: +]
root     20  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [irq9: acpi0]
root     21  0.0  0.0     0     8  ??  WL    1:00PM   0:00.21 [irq17: em0]
root     22  0.0  0.0     0     8  ??  WL    1:00PM   0:00.09 [irq14: ata0]
root     23  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [irq15: ata1]
root     24  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [irq5: ohci0]
root     25  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [usb0]
root     26  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [usbtask]
root     27  0.0  0.0     0     8  ??  DL    1:00PM   0:00.05 [fdc0]
root     28  0.0  0.0     0     8  ??  WL    1:00PM   0:00.01 [irq1: atkbd0]
root     29  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [irq12: psm0]
root     30  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [swi0: sio]
root     31  0.0  0.0     0     8  ??  WL    1:00PM   0:00.00 [irq7: ppc0]
root     32  0.0  0.0     0     8  ??  DL    1:00PM   0:00.01 [pagedaemon]
root     33  0.0  0.0     0     8  ??  DL    1:00PM   0:00.00 [vmdaemon]
root     34  0.0  0.0     0     8  ??  DL    1:00PM   0:01.57 [pagezero]
root     35  0.0  0.0     0     8  ??  DL    1:00PM   0:00.05 [bufdaemon]
root     36  0.0  0.0     0     8  ??  DL    1:00PM   0:00.35 [syncer]
root     37  0.0  0.0     0     8  ??  DL    1:00PM   0:00.05 [vnlru]
root     38  0.0  0.0     0     8  ??  DL    1:00PM   0:00.10 [softdepflush]
root     39  0.0  0.0     0     8  ??  IL    1:00PM   0:00.00 [nfsiod 0]
root     40  0.0  0.0     0     8  ??  IL    1:00PM   0:00.00 [nfsiod 1]
root     41  0.0  0.0     0     8  ??  IL    1:00PM   0:00.00 [nfsiod 2]
root     42  0.0  0.0     0     8  ??  IL    1:00PM   0:00.00 [nfsiod 3]
root     43  0.0  0.0     0     8  ??  DL    1:00PM   0:00.44 [schedcpu]
root    154  0.0  0.1  1176   680  ??  Is    1:01PM   0:00.00 adjkerntz -i
root    266  0.0  0.0   500   360  ??  Is    1:01PM   0:00.00 /sbin/devd
root    318  0.0  0.1  1300   948  ??  Ss    1:01PM   0:00.03 /usr/sbin/syslogd -s
root    392  0.0  0.3  5408  2880  ??  Ss    1:01PM   0:00.54 /usr/local/sbin/nmbd -D -s /usr/local/etc/smb.conf
root    396  0.0  0.6  9384  5840  ??  Is    1:01PM   0:00.02 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf
root    437  0.0  0.1  1212   780  ??  Ss    1:01PM   0:00.01 /usr/sbin/usbd
root    438  0.0  0.6  9384  5828  ??  I     1:01PM   0:00.00 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf
root    465  0.0  0.3  3356  2768  ??  Is    1:01PM   0:00.01 /usr/sbin/sshd
root    471  0.0  0.3  3400  2780  ??  Ss    1:01PM   0:00.21 sendmail: accepting connections (sendmail)
smmsp   475  0.0  0.3  3300  2704  ??  Is    1:01PM   0:00.01 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (se
root    481  0.0  0.1  1312  1044  ??  Is    1:01PM   0:00.03 /usr/sbin/cron -s
root    503  0.0  0.1  1260   768  ??  Is    1:01PM   0:00.00 /usr/sbin/moused -p /dev/psm0 -t auto
root    556  0.0  0.5  6852  5440  ??  Ss    1:02PM   0:00.32 /usr/local/sbin/httpd
www     557  0.0  0.7  8972  7560  ??  I     1:02PM   0:00.46 /usr/local/sbin/httpd
www     558  0.0  0.7  8864  7496  ??  I     1:02PM   0:00.27 /usr/local/sbin/httpd
www     559  0.0  0.7  8720  7356  ??  I     1:02PM   0:00.29 /usr/local/sbin/httpd
www     560  0.0  0.8  9644  8292  ??  I     1:02PM   0:00.35 /usr/local/sbin/httpd
www     561  0.0  0.7  8988  7600  ??  I     1:02PM   0:00.66 /usr/local/sbin/httpd
www     582  0.0  0.8  9292  7892  ??  I     1:03PM   0:00.39 /usr/local/sbin/httpd
www     625  0.0  1.2 14220 12812  ??  I     1:06PM   0:00.67 /usr/local/sbin/httpd
www    3049  0.0  0.7  8836  7464  ??  I     1:52PM   0:00.18 /usr/local/sbin/httpd
root   7769  0.0  0.3  6104  3104  ??  Is    3:08PM   0:00.06 sshd: matt [priv] (sshd)
matt   7776  0.0  0.3  6080  3120  ??  S     3:08PM   0:00.11 sshd: matt@ttyp0 (sshd)
root   8330  0.0  0.0  1172   444  ??  S     3:15PM   0:00.00 sleep 2
root    611  0.0  0.1  1268   904  v0  Is+   1:05PM   0:00.00 /usr/libexec/getty Pc ttyv0
root    542  0.0  0.1  1268   904  v1  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv1
root    543  0.0  0.1  1268   904  v2  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv2
root    544  0.0  0.1  1268   904  v3  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv3
root    545  0.0  0.1  1268   904  v4  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv4
root    546  0.0  0.1  1268   904  v5  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv5
root    547  0.0  0.1  1268   904  v6  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv6
root    548  0.0  0.1  1268   904  v7  Is+   1:01PM   0:00.00 /usr/libexec/getty Pc ttyv7
root    607  0.0  0.2  2220  1900  p0- I     1:05PM   0:00.03 /usr/local/bin/bash
root    612  0.0  0.1  1644  1332  p0- I     1:06PM   0:00.01 /bin/sh /usr/local/bin/safe_mysqld --user=mysql
mysql   624  0.0  0.8 30688  7824  p0- I     1:06PM   0:00.53 /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/d
root    648  0.0  0.2  2220  1900  p0- I     1:12PM   0:00.03 /usr/local/bin/bash
root    652  0.0  0.1  1764  1400  p0- S     1:13PM   0:03.31 sh /usr/local/etc/rc.d/mysql-server stop
matt   7777  0.0  0.2  2192  1872  p0  Is    3:08PM   0:00.02 -bash (bash)
root   7900  0.0  0.1  1604  1304  p0  I     3:10PM   0:00.01 su
root   7909  0.0  0.2  2236  1932  p0  S     3:10PM   0:00.14 /usr/local/bin/bash
root   8331  0.0  0.1  1408   928  p0  R+    3:15PM   0:00.00 ps aux

# 13  
Old 12-14-2006
kill all the instances of mysql and then try starting it again from the shell script, run " kill -9 `ps aux | grep mysql | awk '{print $2}'` "
# 14  
Old 12-14-2006
Okay, so I killed all mysql processes. I check ps aux and no mysql process are running. Then I start it via the shell script and I check ps aux (below). Now I check my website to see if it connects to the database and it doesn't, shows a mysql error. THen I try to connect to the database via the shell and it says
"ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)" Don't I need to start mysqld, or is it already running?

Code:
root  11987  0.0  0.2  2228  1916  p0  S     4:15PM   0:00.04 /usr/local/bin/bash
root  12007  0.0  0.1  1764  1400  p0  S     4:16PM   0:00.01 sh /usr/local/etc/rc.d/mysql-server
root  12017  0.0  0.1  1604  1268  p0  S     4:16PM   0:00.01 su -m mysql -c sh -c "/usr/local/bin
mysql 12018  0.0  0.2  2188  1876  p0  S     4:16PM   0:00.02 /usr/local/bin/bash
mysql 12020  0.0  0.1  1408   928  p0  R+    4:16PM   0:00.00 ps aux

 
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

2. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

3. Shell Programming and Scripting

How to starting process as daemon using ssh command?

Hello, I need to run a command on remote Linux using the ssh command from my local machine. I am able to execute the command on remote machine using ssh but it's behaving strangely. The command is supposed to start a daemon process on remote linux box and the control should return back to me... (5 Replies)
Discussion started by: nitinshukla
5 Replies

4. SCO

Stoping & starting the cron daemon

Hi We are running SCO ver 5. Recently the cron daemon stopped running on its own. How do I find out why? How do I restart/stop it? I typed cron but it didn't work. Will rebooting it do the trick or can I manually start and stop the cron daemon? Please help. Thanks & Regards. (0 Replies)
Discussion started by: othman
0 Replies

5. Solaris

Problems starting apache 1.3 with mysql

I've been working on a project to replace one of the my group's primary NIS servers. It also runs mysql and apache, as it is the host for the our team's hardware tracking database and website. Its running apache 1.3, and for some odd reason, I can't get apache to start on system boot. The... (1 Reply)
Discussion started by: godspunk32
1 Replies

6. Linux

mysql not starting with fedora linux

Hi... I have installed mysql in Fedora and when i tried to start mysql the error i get was "Asked for 196608 thread stack" What might be the problem???? I have tried all ways but doesnt work out........ (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
Login or Register to Ask a Question