View Full Version : MySQL don't start after installation
evernewbie
01-25-2011, 03:17 AM
After a new installation of DA I cannot start MySQL - clicking on "Start" results with nothing.
I've checked the reason -
/home/mysql/<HOSTNAME>.err is just empty.
Can someone help me please?
What happens when you start it from ssh?
evernewbie
01-25-2011, 06:36 AM
serwer:~# /etc/init.d/mysqld start
Starting mysqld: [ OK ]
serwer:~# nohup: redirecting stderr to stdout
evernewbie
01-25-2011, 08:42 AM
No idea what to do, no reply from DA support, no live chat to ask... Great, really great...
I dont see how there is nothing in the error log.
/sbin/service mysqld restart
Did you check
/var/lib/mysql/hostname.err
evernewbie
01-25-2011, 08:59 AM
serwer:~# /sbin/service mysqld restart
-bash: /sbin/service: No such file or directory
serwer:~# /var/lib/mysql/hostname.err
-bash: /var/lib/mysql/hostname.err: No such file or directory
serwer:~# /var/lib/mysql/vps.wroclaw.pl.err
-bash: /var/lib/mysql/my.domain.com.err: No such file or directory
Sorry, I'm not a Linux expert, maybe I type those commands wrong (I mean the hostname part)...?
zEitEr
01-25-2011, 09:35 AM
Post here results
uname -a
and if you use any kind of Linux
hostname -f
than run
tail -20 /var/lib/mysql/`hostname -f`.err
evernewbie
01-25-2011, 09:46 AM
First of all, thanks for your patience...
serwer:~# tail -20 /var/lib/mysql/server.mydomain.com.err
tail: cannot open `/var/lib/mysql/serwer.mydomain.com.err' for reading: No such file or directory
- I'm afraid, there is no such file on the server. Of course, I've entered my hostname carefully.
zEitEr
01-25-2011, 09:58 AM
Is there any file in /var/lib/mysql/? Please, post all results here. It's important.
ls -l /var/lib/mysql/
and
ls -ld /var/lib/mysql/
What about
uname -a
I need to know your OS type to help more.
/etc/init.d/mysqld restart
evernewbie
01-25-2011, 10:08 AM
Here they are:
serwer:~# ls -l /var/lib/mysql/
ls: cannot access /var/lib/mysql/: No such file or directory
serwer:~# ls -ld /var/lib/mysql/
ls: cannot access /var/lib/mysql/: No such file or directory
serwer:~# uname -a
Linux serwer.vps.wroclaw.pl 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64 GNU/Linux
serwer:~# /etc/init.d/mysqld restart
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
serwer:~# nohup: redirecting stderr to stdout
evernewbie
01-25-2011, 10:11 AM
And the exactly OS is: Debian 5.0.8 64 bit
zEitEr
01-25-2011, 10:18 AM
Since you've got Debian you can use:
invoke-rc.d mysqld restart
Ok, just after mysql was restarted, is /var/lib/mysql/ still missing?
If yes, run
mkdir /var/lib/mysql
chown mysql:mysql /var/lib/mysql/
chmod 750 /var/lib/mysql/
Re-start mysql and do tail again for error log.
evernewbie
01-25-2011, 10:21 AM
Sorry, but:
serwer:~# rc-invoke mysqld restart
-bash: rc-invoke: command not found :confused:
evernewbie
01-25-2011, 10:22 AM
...will be done...
evernewbie
01-25-2011, 10:24 AM
Still no such file or directory:
serwer:~#
serwer:~# invoke-rc.d mysqld restart
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
serwer:~# nohup: redirecting stderr to stdout
ls -l /var/lib/mysql/
ls: cannot access /var/lib/mysql/: No such file or directory
serwer:~# ls -ld /var/lib/mysql/
ls: cannot access /var/lib/mysql/: No such file or directory
evernewbie
01-25-2011, 10:29 AM
serwer:~# invoke-rc.d mysqld restart
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
serwer:~# nohup: redirecting stderr to stdout
ls -l /var/lib/mysql/
ls: cannot access /var/lib/mysql/: No such file or directory
serwer:~# ls -ld /var/lib/mysql/
ls: cannot access /var/lib/mysql/: No such file or directory
serwer:~#
serwer:~# mkdir /var/lib/mysql
serwer:~# chown mysql:mysql /var/lib/mysql/
serwer:~# chmod 750 /var/lib/mysql/
serwer:~# /etc/init.d/mysqld start
Starting mysqld: [ OK ]
serwer:~# nohup: redirecting stderr to stdout
serwer:~# tail -20 /var/lib/mysql/serwer.vps.wroclaw.pl.err
tail: cannot open `/var/lib/mysql/serwer.vps.wroclaw.pl.err' for reading: No such file or directory
zEitEr
01-25-2011, 10:43 AM
And what about
grep log /etc/my.cnf
?
Is there error log specified? Where is it located?
Try to check /var/log/message and/or /var/log/messagemessages.err
Is your mysql-server installed with directadmin or apt-get/aptitude?
Try
aptitude purge mysql-server
aptitude purge mysql-server-5.0
aptitude purge mysql-server-5.1
And than re-start.
evernewbie
01-25-2011, 10:56 AM
All done, but there is still no error log...
All was installed with directadmin.
Here are the results:
serwer:~# grep log /etc/my.cnf
serwer:~# /var/log/message
-bash: /var/log/message: No such file or directory
serwer:~# /var/log/messagemessages.err
-bash: /var/log/messagemessages.err: No such file or directory
serwer:~# aptitude purge mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
serwer:~# aptitude purge mysql-server-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
serwer:~# aptitude purge mysql-server-5.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Couldn't find any package whose name or description matched "mysql-server-5.1"
Couldn't find any package whose name or description matched "mysql-server-5.1"
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
serwer:~# /etc/init.d/mysqld start
Starting mysqld: [ OK ]
serwer:~# nohup: redirecting stderr to stdout
serwer:~# tail -20 /var/lib/mysql/serwer.vps.wroclaw.pl.err
tail: cannot open `/var/lib/mysql/serwer.vps.wroclaw.pl.err' for reading: No such file or directory
serwer:~#
Have you ever had mysql working on your server?
I would try:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build mysql d
evernewbie
01-25-2011, 11:11 AM
@scsi: yes. The story is: my server was working properly incl. MySQL. Unfortunately, the ISP did not installed the 'quota' command and had to reinstall DA. After that I cannot use it.
OK, I did what you suggested - here is the result:
serwer:~# cd /usr/local/directadmin/custombuild
serwer:/usr/local/directadmin/custombuild# ./build update
--2011-01-25 20:02:07-- http://files.directadmin.com/services/custombuild/1.1/custombuild.tar.gz
Resolving files.directadmin.com... 72.35.85.222
Connecting to files.directadmin.com|72.35.85.222|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 103676 (101K) [application/x-gzip]
Saving to: `./custombuild.tar.gz'
100%[======================================>] 103,676 116K/s in 0.9s
2011-01-25 20:02:08 (116 KB/s) - `./custombuild.tar.gz' saved [103676/103676]
extracting custombuild.tar.gz for 1.1 ...
custombuild/
custombuild/build
custombuild/configure/
custombuild/configure/pureftpd/
custombuild/configure/pureftpd/configure.pureftpd
custombuild/configure/ap1/
custombuild/configure/ap1/configure.php5
custombuild/configure/ap1/configure.apache_ssl
custombuild/configure/ap1/conf/
custombuild/configure/ap1/conf/mime.types
custombuild/configure/ap1/conf/httpd.conf
custombuild/configure/ap1/conf/extra/
custombuild/configure/ap1/conf/extra/httpd-vhosts.conf
custombuild/configure/ap1/conf/extra/httpd-deflate.conf
custombuild/configure/ap1/conf/extra/httpd-multilang-errordoc.conf
custombuild/configure/ap1/conf/extra/httpd-info.conf
custombuild/configure/ap1/conf/extra/httpd-alias.conf
custombuild/configure/ap1/conf/extra/httpd-userdir.conf
custombuild/configure/ap1/conf/extra/httpd-languages.conf
custombuild/configure/ap1/conf/extra/httpd-default.conf
custombuild/configure/ap1/conf/extra/httpd-autoindex.conf
custombuild/configure/ap1/conf/extra/directadmin-vhosts.conf
custombuild/configure/ap1/conf/extra/httpd-ssl.conf
custombuild/configure/ap1/conf/magic
custombuild/configure/ap1/configure.php4
custombuild/configure/ap2/
custombuild/configure/ap2/configure.php5
custombuild/configure/ap2/conf/
custombuild/configure/ap2/conf/httpd.conf_2.0
custombuild/configure/ap2/conf/mime.types
custombuild/configure/ap2/conf/httpd.conf
custombuild/configure/ap2/conf/extra/
custombuild/configure/ap2/conf/extra/httpd-vhosts.conf
custombuild/configure/ap2/conf/extra/httpd-deflate.conf
custombuild/configure/ap2/conf/extra/httpd-mpm.conf
custombuild/configure/ap2/conf/extra/httpd-multilang-errordoc.conf
custombuild/configure/ap2/conf/extra/httpd-mpm.conf_2.0
custombuild/configure/ap2/conf/extra/httpd-info.conf
custombuild/configure/ap2/conf/extra/httpd-alias.conf
custombuild/configure/ap2/conf/extra/httpd-userdir.conf
custombuild/configure/ap2/conf/extra/httpd-languages.conf
custombuild/configure/ap2/conf/extra/httpd-dav.conf
custombuild/configure/ap2/conf/extra/httpd-default.conf
custombuild/configure/ap2/conf/extra/httpd-autoindex.conf
custombuild/configure/ap2/conf/extra/directadmin-vhosts.conf
custombuild/configure/ap2/conf/extra/httpd-ssl.conf
custombuild/configure/ap2/conf/extra/httpd-manual.conf
custombuild/configure/ap2/conf/magic
custombuild/configure/ap2/cert_config
custombuild/configure/ap2/configure.apache
custombuild/configure/ap2/configure.php4
custombuild/configure/dovecot/
custombuild/configure/dovecot/dovecot.conf
custombuild/configure/proftpd/
custombuild/configure/proftpd/configure.proftpd
custombuild/configure/suphp/
custombuild/configure/suphp/configure.php5
custombuild/configure/suphp/configure.suphp
custombuild/configure/suphp/configure.php4
--2011-01-25 20:02:08-- http://files.directadmin.com/services/custombuild/versions.txt
Resolving files.directadmin.com... 72.35.85.222
Connecting to files.directadmin.com|72.35.85.222|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4466 (4.4K) [text/plain]
Saving to: `./versions.txt'
100%[======================================>] 4,466 --.-K/s in 0.01s
2011-01-25 20:02:09 (385 KB/s) - `./versions.txt' saved [4466/4466]
File already exists: servers.txt
MD5 Checksum on servers.txt passed.
File already exists: httpd-2.2.17.tar.gz
MD5 Checksum on httpd-2.2.17.tar.gz passed.
File already exists: httpd_2
File already exists: httpd_2_freebsd
File already exists: httpd_2_debian
File already exists: mime.types
File already exists: mod_perl-2.0.4.tar.gz
MD5 Checksum on mod_perl-2.0.4.tar.gz passed.
File already exists: curl-7.21.3.tar.gz
MD5 Checksum on curl-7.21.3.tar.gz passed.
File already exists: pcre-8.10.tar.gz
MD5 Checksum on pcre-8.10.tar.gz passed.
File already exists: libmcrypt-2.5.8.tar.gz
MD5 Checksum on libmcrypt-2.5.8.tar.gz passed.
File already exists: mhash-0.9.9.9.tar.gz
MD5 Checksum on mhash-0.9.9.9.tar.gz passed.
File already exists: freetype-2.4.4.tar.gz
MD5 Checksum on freetype-2.4.4.tar.gz passed.
File already exists: libiconv-1.13.1.tar.gz
MD5 Checksum on libiconv-1.13.1.tar.gz passed.
File already exists: libxml2-2.7.6.tar.gz
MD5 Checksum on libxml2-2.7.6.tar.gz passed.
File already exists: libxslt-1.1.26.tar.gz
MD5 Checksum on libxslt-1.1.26.tar.gz passed.
File already exists: icu4c-4_4_1-src.tgz
MD5 Checksum on icu4c-4_4_1-src.tgz passed.
File already exists: php-5.2.17.tar.gz
MD5 Checksum on php-5.2.17.tar.gz passed.
File already exists: php-5.2.17-mail-header.patch
MD5 Checksum on php-5.2.17-mail-header.patch passed.
File already exists: webalizer-2.23-03-src.tgz
File already exists: suphp-0.7.1.tar.gz
MD5 Checksum on suphp-0.7.1.tar.gz passed.
File already exists: dovecot-2.0.9.tar.gz
MD5 Checksum on dovecot-2.0.9.tar.gz passed.
File already exists: dovecot.boot
File already exists: dovecot.boot.freebsd
File already exists: dovecot.boot.debian
File already exists: dovecot.conf
File already exists: exim.conf.dovecot.patch
MD5 Checksum on exim.conf.dovecot.patch passed.
File already exists: autoconf-2.67.tar.gz
MD5 Checksum on autoconf-2.67.tar.gz passed.
File already exists: m4-1.4.15.tar.gz
MD5 Checksum on m4-1.4.15.tar.gz passed.
File already exists: automake-1.11.1.tar.gz
MD5 Checksum on automake-1.11.1.tar.gz passed.
File already exists: libtool-2.4.tar.gz
MD5 Checksum on libtool-2.4.tar.gz passed.
serwer:/usr/local/directadmin/custombuild# ./build clean
serwer:/usr/local/directadmin/custombuild# ./build mysql d
ls: cannot access */: No such file or directory
Stopping mysqld ...
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
Giving mysqld a few seconds to start up...
nohup: redirecting stderr to stdout
Looking for 'mysql' as: /usr/local/mysql/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql/bin/mysqlcheck
Running 'mysqlcheck'...
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
Restarting MySQL.
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
It is recommended to do "./build php n" after MySQL update.
nohup: redirecting stderr to stdout
serwer:/usr/local/directadmin/custombuild#
Are you logged in as the root user? I wasnt aware that custombuild required a previous mysql to be installed. You might have to have someone look at your server.
Try contacting directadmin support here:
https://www.directadmin.com/clients/safesubmit.php
evernewbie
01-25-2011, 11:21 AM
Yes, I use the root login & password.
OK, I will contact DA support as you suggest, but do they answer at all?
:confused:
Try this:
cd /usr/local/directadmin/scripts
./mysql.sh
evernewbie
01-25-2011, 11:32 AM
Oh...
serwer:/usr/local/directadmin/scripts# ./mysql.sh
Usage: ./mysql.sh mysqlrootpass da_dbuser da_pass
Where do I find those passwords? Or should I create them? :eek:
You create them.
It should look like this:
./mysql.sh password da_admin password
Replace password with whatever password you want.
Then put that password in /usr/local/directadmin/conf/mysql.conf when you are done.
In /usr/local/directadmin/conf/mysql.conf
user=da_admin
pass=password
Restart directadmin after you are done.
When you are done you also will need to recompile php with custombuild.
cd /usr/local/directadmin/custombuild
./build php n
evernewbie
01-25-2011, 11:44 AM
Then put that password in /usr/local/directadmin/conf/mysql.conf when you are done.
In /usr/local/directadmin/conf/mysql.conf
user=da_admin
pass=password
I am very sorry, but as a absolutely newbie I don't know how to get, edit and replace such a file at the moment. Maybe I should better leave it and wait for DA-support's visit on my server...
evernewbie
01-25-2011, 12:32 PM
Well, I've found a way to make it all - unfortunately, I have no MySQL as before.
But I'm happy, that the whole DA installation was not destroyed. And I've lerned a lot of new things while I was acting there...
Now, let's see the power of DA support...
I want to say a big THANK YOU to all users which were trying to help me.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.