View Full Version : Missing MySQL files

02-17-2008, 03:26 PM
I've been having a lot of headaches with my server. I just installed a new server last night and transfered data from the old DA server I had. This was a clean install on Ubuntu 7.10 i386. The issues I have been having have been related to components of the CustomBuild script. I've compiled custom build a couple times with different setting and each one has a weird quirk. Currently I dont have any documentation on those quirks but what I did find is that there are missing MySQL files on the directadmin site.


Currently there are only files in there for 5.0. I was attempting to install 5.1 and apparently things were erroring out because it wasn't able to obtain those files. I tried to install 5.0 by changing the options.conf file and then running ./build mysql but it complained about not being able to find any existing mysql directories, etc..... the issue is that MySQL seemingly wasn't installed and it needs to be a fresh install.

Currently I am running a "./build all d" with MySQL being set to 5.0 and hoping that it goes through the entire process correctly but I wanted to see if anyone has any insight into this issue.

I will post any results that occur during this compile.


02-17-2008, 03:54 PM
* *
* All parts have been installed *
* *

Type: /etc/init.d/httpd restart
root@mojo:/usr/local/directadmin/custombuild# /etc/init.d/httpd restart
Stopping httpd:
Starting httpd: httpd: Syntax error on line 18 of /etc/httpd/conf/httpd.conf: API module structure 'suphp_module' in file /usr/lib/apache/mod_suphp.so is garbled - expected signature 41503232 but saw 41503230 - perhaps this is not an Apache module DSO, or was compiled for a different Apache version?


This is what I'm getting after I completed the latest compile. Here is my options.conf file:

#PHP settings. default_php possible values - 4 or 5
#Possible values - recommended or dist

#Possible values - 5.0 or 5.1 (4.1 is possible too, but it's EOL)

#Possible values - 1.3, 2.0 or 2.2

#Web applications

#Mail options

#FTP options

#Custombuild options

02-17-2008, 04:58 PM
Another update. Because I really need httpd to be running I removed the option to install php4 and ran ./build all d again. Everything installed and ran ok except now I'm getting issues with pear about PHP not having the mysql module.

root@mojo:/usr/local/lib# pear install MDB2#mysql
Skipping package "pear/MDB2", already installed as version 2.4.1
pear/MDB2_Driver_mysql requires PHP extension "mysql"
No valid packages found
install failed

I'm not sure if this directly pertains to what CustomBuild does but it would seem like it should?

02-17-2008, 05:40 PM
I found that I can apt-get it but it'll also install mysql-common. If I do this will it create issues with DirectAdmin?

root@mojo:/etc/apt# apt-get install php5-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libmysqlclient15off mysql-common
The following NEW packages will be installed:
libmysqlclient15off mysql-common php5-mysql
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 1988kB of archives.
After unpacking 4502kB of additional disk space will be used.
Do you want to continue [Y/n]?

I havent done this yet but I'm getting desperate :) My billing system is the application that isn't running and, well, I need money :)

02-17-2008, 09:33 PM
If you guys just let me go I'm either going to break somethig really bad or actually solve this problem myself. Either way it should be rather entertaining :)

I went ahead and did apt-get install php5-mysql and that solved my problem, however, I am still having issues with connecting to the mysqld daemon. DA shows that mysqld is running and lists the PIDs but when I go into MySQL management I get this error:

Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

If anyone has any thoughts on this, I would appreciate it..... :D

02-17-2008, 10:16 PM
Well, I fixed it... sort of! But this part I could *REALLY* use some input on.

What I found was that mysqld had been running and binding the sockets but nothing seemed to know that it was running. Direct Admin saw the PIDs but if I told it to stop or start it said an error has occured. I did a killall mysqld and then told Direct Admin to start it and I got "An error has occured" ..... but mysqld still launched. I tried stopping it and got the same error..... but mysqld did shut down. It seems that direct admin is able to control mysqld but for some reason it doesnt think it can.

Additionally, another fun issue arose. I decided to reboot the server just in case there was some other processes running that weren't known and upon reboot proftpd did not start and DirectAdmin sent me the message indicating that it was not running. When I went to start it manually, this is what I got and what I did:

root@mojo:/usr/local/lib# /etc/init.d/proftpd start
Starting proftpd: - Fatal: ScoreboardFile: : unable to use '/var/run/proftpd/proftpd.pid': No such file or directory on line 13 of '/etc/proftpd.conf'

touch: cannot touch `/var/lock/subsys/proftpd': No such file or directory
root@mojo:/usr/local/lib# cd /var/lock
root@mojo:/var/lock# ls -la
total 4
drwxrwxrwt 2 root root 40 2008-02-18 00:45 .
drwxr-xr-x 16 root root 4096 2008-02-17 01:44 ..
root@mojo:/var/lock# cd ../run
root@mojo:/var/run# ls -la
total 44
drwxr-xr-x 9 root root 400 2008-02-18 00:57 .
drwxr-xr-x 16 root root 4096 2008-02-17 01:44 ..
-rw-r--r-- 1 root root 5 2008-02-18 00:46 atd.pid
drwxr-xr-x 3 root root 60 2008-02-18 00:45 bind
drwxr-xr-x 2 root root 40 2008-02-18 00:57 console
-rw-r--r-- 1 root root 5 2008-02-18 00:46 crond.pid
---------- 1 root root 0 2008-02-18 00:46 crond.reboot
-rw-r--r-- 1 root root 5 2008-02-18 00:46 da-popb4smtp.pid
-rw-r--r-- 1 root root 5 2008-02-18 00:46 directadmin.pid
drwxr-xr-x 3 root root 120 2008-02-18 00:46 dovecot
-rw-r--r-- 1 root mail 5 2008-02-18 00:46 exim.pid
-rw-r--r-- 1 root root 5 2008-02-18 00:46 httpd.pid
drwxr-xr-x 2 klog klog 100 2008-02-18 00:45 klogd
-rw-r--r-- 1 root root 354 2008-02-18 00:45 motd
drwxr-xr-x 2 root root 60 2008-02-18 00:42 network
drwxr-xr-x 2 root root 40 2008-02-18 00:45 pppconfig
drwxr-xr-x 2 root root 40 2008-02-18 00:45 sshd
-rw-r--r-- 1 root root 5 2008-02-18 00:45 sshd.pid
-rw-r--r-- 1 root root 5 2008-02-18 00:45 syslogd.pid
-rw-rw-r-- 1 root utmp 3456 2008-02-18 00:47 utmp
root@mojo:/var/run# mkdir proftpd
root@mojo:/var/run# /etc/init.d/proftpd start
Starting proftpd:
touch: cannot touch `/var/lock/subsys/proftpd': No such file or directory
root@mojo:/var/run# mkdir /var/lock
mkdir: cannot create directory `/var/lock': File exists
root@mojo:/var/run# mkdir /var/lock/subsys
root@mojo:/var/run# /etc/init.d/proftpd start
Starting proftpd:
root@mojo:/var/run# ftp localhost
Connected to localhost.
220 ProFTPD 1.3.1 Server ready.
Name (localhost:root): root@mojo:/var/run#

I do have everything functioning but it would be really nice not to have to deal with manually starting ProFTPd and if DirectAdmin new what it was capable of with MySQLd :rolleyes:

DirectAdmin Support
02-18-2008, 03:35 AM

For MySQL 5.1, it's not yet declared as "stable" on dev.mysql.com, thus we dont have it available yet. Use 5.0.
As for DA thinking it's can't control it, if the mysql boot script returns a non-zero result, DA will say there is an error. You can hide this if you want by adding "exit 0;" to the bottom before the script exists, but that would hide any real issues that may be present as well. I'm not too sure why the mysqld would be returning an error and working fine.. maybe check the /home/mysql/`hostname`.err file.

This may also be related for you, if you want 5.1 or binaries compiled specifically for your system:

I don't have much experience with pear, so I can't really comment on that.

For apt-get, I wouldn't recommend installing php through apt. Mysql can work, in theory, but you'd have to make sure all the boot script paths are DA friendly, eg, DA looks for /etc/init.d/mysqld, and not /etc/init.d/mysql.

For the mod_suphp error, that sounds like it just needed to be recompiled, or possibly you needed to run:
./build rewrite_confs
I'm not too sure.. maybe smtalk knows of anything we're missing?


02-18-2008, 03:39 AM
You should try:

./build suphp

Let us know if it solves your problem :)