LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-16-2007, 03:04 PM   #1
File.am
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Rep: Reputation: 0
how to restart mysql


Hello

I'm on FreeBSD 6.2 dedicated server with root access
control-panel Directadmin

Today i check that i cann't login into directadmin. at the same time ftp and ssh access are live.

try to do restart and after this mysql service is down too.

all my attempts to do restart aren't successful.

1. don't have http access to DA
2. have ftp access, but cann't overwrite files
3. have ssh access
4. mysql service is stoped

try to do mysql restart with this command

/usr/local/etc/rc.d/mysql-server.sh stop
but there isn't such file

try to connect to mysql and get such output

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local
MySQL server through socket '/tmp/mysql.sock' (2) in


what to do ?

any advise will be appreciated
 
Old 03-16-2007, 03:53 PM   #2
fr33z
LQ Newbie
 
Registered: Mar 2007
Distribution: Gentoo 2006.1 && Slackware 11.0
Posts: 11

Rep: Reputation: 0
Hi there,
The simpliest way is
Code:
slocate mysql | grep '/etc/'
It should find the init script, then you will run it with parameter restart.

If it will fail, try
Code:
whereis mysqld
it could find something like /usr/sbin/mysqld so type
Code:
/usr/sbin/mysqld > /dev/null &
and the mysql daemon will start.

Another way is to try
Code:
slocate mysql | less
this will find every mysql files and you will see where is the init script.

Last edited by fr33z; 03-16-2007 at 03:55 PM.
 
Old 03-16-2007, 04:26 PM   #3
File.am
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Code:
[root@serv-IP-** /usr/home/admin]# /usr/local/etc/rc.d/mysqld > /dev/null &
output
Code:
[1] 63904
and nothing changed. mysql don't starts and access to DA is still closed

try after 5 minutes the same command
Code:
[2] 66150
[1]   Exit 64                 /usr/local/etc/rc.d/mysqld >/dev/null

and once again, nothing changed
 
Old 03-16-2007, 04:34 PM   #4
fr33z
LQ Newbie
 
Registered: Mar 2007
Distribution: Gentoo 2006.1 && Slackware 11.0
Posts: 11

Rep: Reputation: 0
Ok, is the mysql running?
Code:
ps aux | grep mysql
If not, try run
Code:
/usr/local/etc/rc.d/mysqld
it will write an error message, which can be very useful in this case.
 
Old 03-16-2007, 04:43 PM   #5
File.am
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Original Poster
Rep: Reputation: 0
output

root 57277 0.0 0.3 1728 1312 p0- S 11:21PM 0:13.15 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql --datadir
mysql 94666 0.0 3.5 19756 17068 ?? R 11:44PM 0:00.11 /usr/local/mysql-5.0.22-freebsd6.0-i386/bin/mysqld --basedir=/u
root 94668 0.0 0.2 1592 992 p0 S+ 11:44PM 0:00.00 grep mysql
 
Old 03-16-2007, 04:44 PM   #6
File.am
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Original Poster
Rep: Reputation: 0
try to stop

Code:
/usr/local/etc/rc.d/mysqld stop
output

Stopping mysqld: [ FAILED ]

try to start

Code:
Starting mysqld:                [ OK ]
[root@serv-IP** /usr/local/mysql/scripts]#
/usr: write failed, filesystem is full

/usr: write failed, filesystem is full

/usr: write failed, filesystem is full

/usr: write failed, filesystem is full

/usr: write failed, filesystem is full

/usr: write failed, filesystem is full

/usr: write failed, filesystem is full 

etc etc
 
Old 03-16-2007, 04:52 PM   #7
fr33z
LQ Newbie
 
Registered: Mar 2007
Distribution: Gentoo 2006.1 && Slackware 11.0
Posts: 11

Rep: Reputation: 0
Your disk is evidently full =) Run
Code:
df -h
it will print you the free space on the all mounted disks, after that delete something on the full disk and try again /usr/local/etc/rc.d/mysqld {start|stop|restart}
 
Old 03-16-2007, 05:14 PM   #8
File.am
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Original Poster
Rep: Reputation: 0
FR33z .. .great thank you :-)

i'll contact you via PM (may be i can help you too :-))

Code:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    496M     38M    418M     8%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad0s1e    496M     14K    456M     0%    /tmp
/dev/ad0s1f     33G     26G    3.7G    88%    /usr
/dev/ad0s1d    1.4G    1.1G    196M    85%    /var
procfs         4.0K    4.0K      0B   100%    /proc
the last question, is it mean that server size is ~35gb ?

thank you once again :-)
 
Old 03-17-2007, 06:42 AM   #9
fr33z
LQ Newbie
 
Registered: Mar 2007
Distribution: Gentoo 2006.1 && Slackware 11.0
Posts: 11

Rep: Reputation: 0
I'm happy that it works now - the total size of all mounted partitions is ~35GB.
 
  


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
FC5 restart httpd stops mysql dradept Linux - Newbie 2 11-12-2006 03:10 AM
/etc/init.d/mysql restart problem meenalborkar Debian 3 11-11-2005 07:40 AM
MySQL restart script? Fuwex Debian 2 08-17-2005 02:23 PM
Mysql crashes after restart ... :( sys7em Slackware 1 11-24-2004 03:33 PM
Restarting mysql database on restart psycho2000 Linux - Newbie 3 06-01-2003 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:26 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