pear install DBYou should see something like
downloading DB-1.6.8.tgz ... Starting to download DB-1.6.8.tgz (92,460 bytes) .....................done: 92,460 bytes install ok: DB 1.6.8and find the file under /usr/share/pear/DB.php.
050126 00:31:40 mysqld started 050126 0:31:40 Warning: Can't create test file /var/lib/mysql/localhost.lower-test 050126 0:31:40 Can't start server : Bind on unix socket: Permission denied 050126 0:31:40 Do you already have another mysqld server running on socket: /var/lib/mysql/mysql.sock ? 050126 0:31:40 AbortingWell, today I finally found what may be the solution. Short version:
If you still have a problem after trying this, please email me.
Justin Mitchell <justinhomi at gmail -dot- com> wrote the following:
I followed the link you gave and successfully installed MySQL 4.0 and 4.1. There is one "catch". Once I turn selinux back on, MySQL fails to work (can't view databases).
The way to fix this permanantly is to disable selinux's policy for mysql. There are two ways::
Edit /etc/selinux/targeted and set mysqld_disable_trans=1 (from 0).
This can also be done using the Security Level tool found in the System Settings menu in the gnome applications menu.
You must restart the computer after applying this fix.
One more wrinkle: In one instance, I dunno why, but I had to blow away /var/lib/mysql/ and re-install the server component using the --force RPM option, before the server would start. ???
I also found that with your install procedure, someone left out the permissions setting on the php session directory. It should have been done as part of the php rpm install. Folks need to set it to 1777.
I wanted to bring something to your attention that you might want ro share with the public who discover your website. PhpMyAdmin, the most popular remote MySql admin tool in Linux, has a problem with Fedora Core 3. It gives an Error 2002 MySql error when you try to connect. It drove me crazy searching the internet for an answer. Finally I found the problem was Selinux(sp?). Selinux secures httpd and causes phpMyAdmin to receive a MySql error when it tries to query the MySql server. The simple answer is to unsecure httpd. There is a much more exotic answer about special domains which can be found on the fedora-rehat.com page in the Nov 2004 messages. The answer was very sophisticated - way beyond me - so I only read the first two sentences and gave up.
I didn't realize it was that hard... until I got into the process. I ended up with other issues than you (I was on a classic i386 platform).
In my case, I had to manually install the openssl lib's and then use "rpm -i --nodep" later on. This was because all I was missing was the newer versions of the dynamic lib's, but if I installed the whole rpm, I would have been in dependency-hell. This way, I have two lib's, one for the whole system and one for php to use.$ ls -tl /lib/libssl.so.* /lib/libcrypto.so.* lrwxrwxrwx 1 root root 16 May 25 15:28 /lib/libssl.so.5 -> libssl.so.0.9.7f lrwxrwxrwx 1 root root 19 May 25 15:28 /lib/libcrypto.so.5 -> libcrypto.so.0.9.7f -rwxr-xr-x 1 root root 1130028 May 19 02:39 /lib/libcrypto.so.0.9.7f -rwxr-xr-x 1 root root 230056 May 19 02:39 /lib/libssl.so.0.9.7f lrwxrwxrwx 1 root root 19 Dec 7 17:33 /lib/libcrypto.so.2 -> libcrypto.so.0.9.6b lrwxrwxrwx 1 root root 16 Dec 7 17:33 /lib/libssl.so.2 -> libssl.so.0.9.6b lrwxrwxrwx 1 root root 19 Dec 7 17:18 /lib/libcrypto.so.4 -> libcrypto.so.0.9.7a lrwxrwxrwx 1 root root 16 Dec 7 17:18 /lib/libssl.so.4 -> libssl.so.0.9.7a -rwxr-xr-x 1 root root 933448 Oct 5 2004 /lib/libcrypto.so.0.9.7a -rwxr-xr-x 1 root root 213640 Oct 5 2004 /lib/libssl.so.0.9.7a -rwxr-xr-x 1 root root 824176 Sep 20 2004 /lib/libcrypto.so.0.9.6b -rwxr-xr-x 1 root root 186312 Sep 20 2004 /lib/libssl.so.0.9.6bThe first four files are the ones I "collected" from the openssl-0.9.7f-7.i386.rpm file via rpm2cpio.
Here's my version/clarification of that process:
A couple months after doing the installation detailed here, I needed to add php-gd (graphics support). But I couldn't find 5.0.2 rpms anymore, so I had to upgrade php and all of its sibling RPMs to 5.0.4. Seemed easy enough...wget ftp://22.214.171.124/linux/fedora/core/development/x86_64/Fedora/RPMS/php-5.0.4-10.3.x86_64.rpm wget ftp://126.96.36.199/linux/fedora/core/development/x86_64/Fedora/RPMS/php-mysql-5.0.4-10.3.x86_64.rpm wget ftp://188.8.131.52/linux/fedora/core/development/x86_64/Fedora/RPMS/php-gd-5.0.4-10.3.x86_64.rpm wget ftp://184.108.40.206/linux/fedora/core/development/x86_64/Fedora/RPMS/php-pear-5.0.4-10.3.x86_64.rpm rpm -Uvh php-5.0.4-10.3.x86_64.rpm php-mysql-5.0.4-10.3.x86_64.rpm php-pear-5.0.4-10.3.x86_64.rpmAnd I got a million openssl dependency issues. So, trying what worked before, to install the development openssl RPMs alongside the existing ones already on my system...wget ftp://220.127.116.11/linux/fedora/core/development/x86_64/Fedora/RPMS/openssl-0.9.7f-7.x86_64.rpm wget ftp://18.104.22.168/linux/fedora/core/development/x86_64/Fedora/RPMS/openssl-devel-0.9.7f-7.x86_64.rpm sudo rpm -i --force openssl-*But now I get a bunch of krb5 dependency problems. So, I either couldn't find stock krb5 RPMs of the right version/distro, or I could but there was some kind of problem (can't remember), because I ended up using the SOURCE rpm:wget ftp://fr.rpmfind.net/linux/fedora/core/development/SRPMS/krb5-1.4.1-3.src.rpm rpm -i krb5-1.4.1-3.src.rpm cd /usr/src/redhat/SPECS/ rpmbuild -ba krb5.spec cd ../RPMS/x86_64/ rpm -Uvh krb5-devel-1.4.1-3.x86_64.rpm krb5-libs-1.4.1-3.x86_64.rpm krb5-workstation-1.4.1-3.x86_64.rpmAnd that worked. Then I went back to the openssl force:rpm -i --force openssl-*And THAT worked. Finally, PHP:rpm -Uvh php-5.0.4-10.3.x86_64.rpm php-mysql-5.0.4-10.3.x86_64.rpm php-pear-5.0.4-10.3.x86_64.rpmHooray! Lastly, I checked the php.ini file because I had made some specific changes and needed to make sure they weren't overwritten or made obsolete by the new php version.diff php.ini php.ini.rpmnew
I was able to follow the instructions and upgrade PHP to v5, whoohoo....
But, I also need to install php-snmp package where more problems come in...[root@cactitest mysql-pkg]# rpm -Uvh php-snmp-5.0.4-10.3.i386.rpm error: Failed dependencies: librpm-4.4.so is needed by php-snmp-5.0.4-10.3.i386 librpmio-4.4.so is needed by php-snmp-5.0.4-10.3.i386Now, these libraries seem to be part of rpm, but there are many more Dependencies when trying to upgrade rpm...Am I stuck with the upgrades Of all those pieces and whatever other dependencies they will have ?
Here's what I did, but, I don't know how to test whether php-snmp actually _works_ or not:
wget ftp://rpmfind.net/linux/fedora/core/development/x86_64/Fedora/RPMS/rpm-libs-4.4.1-22.x86_64.rpm rpm -i rpm-libs-4.4.1-22.x86_64.rpm rpm -i --nodeps rpm-libs-4.4.1-22.x86_64.rpm rpm -Uvh php-snmp-5.0.4-10.3.x86_64.rpm
Introduction: Normally, the popular MySQL and PHP packages are included in the Linux distribution itself, and that is indeed the case with FC3; however, it's MySQL 3.32 and PHP 4, each of which is a full version number behind. Yes, they're stable, but there are key features available in the more bleeding-edge releases (such as support for true transaction locking).
I could've compiled both from source, but installing programs with RPM is preferable because it vastly simplifies configuration changes and upgrades later. A full review of RPM is outside the scope of this document, but the most basic options are covered here.
rpm -e perl-DBD-MySQL mysql mod_auth_mysql php-mysql libdbi-dbd-mysql MyODBC MySQL-python mysql-bench mysql-devel mysql-serverIf it complains about any of these being needed by other installed components, tack those components' names onto the end of the rpm command and try again. That's how I formed the command line above (I started with just "rpm -e mysql"). To check for all mysql-related packages in your installation, do
rpm -qa | grep -i mysql
rpm -Uvh MySQL-server-4.1.8-0.glibc23.x86_64.rpm MySQL-client-4.1.8-0.glibc23.x86_64.rpm MySQL-devel-4.1.8-0.glibc23.x86_64.rpm MySQL-shared-4.1.8-0.glibc23.x86_64.rpmThen start mysqld, set initial password, all is well:
/etc/init.d/mysql start mysqladmin -u root password 'mynewpassword' mysqladmin -h myfullyqualifiedhostname -u root password 'mynewpassword'
rpm -e php-ldap php-pear phpCheck to make sure you got it all with
rpm -qa | grep -i php
The official php.net site does not distribute Linux binaries, so I went to RPMfind.net and grabbed them from the Fedora Core Development list. These are the ones I knew I wanted, but there may be others depending on what you're using PHP for:
php-devel-5.0.2-8.x86_64.rpm php-pear-5.0.2-8.x86_64.rpm php-mysql-5.0.2-8.x86_64.rpm php-gd-5.0.2-8.x86_64.rpm php-5.0.2-8.x86_64.rpmInstallation attempt:
rpm -Uvh php-5.0.2-8.x86_64.rpm php-devel-5.0.2-8.x86_64.rpm php-mysql-5.0.2-8.x86_64.rpm php-pear-5.0.2-8.x86_64.rpmAnd I got this error:
error: Failed dependencies: libdb-4.3.so()(64bit) is needed by php-5.0.2-8.x86_64Turns out these are part of db4, the Berkeley DB database library (version 4).
rpm -Uvh db4-4.3.21-1.x86_64.rpmAnd now the uber-error:
error: Failed dependencies: libdb-4.2.so()(64bit) is needed by (installed) perl-5.8.5-9.x86_64 libdb-4.2.so()(64bit) is needed by (installed) python-2.3.4-11.x86_64 libdb-4.2.so()(64bit) is needed by (installed) pam_ccreds-1-3.x86_64 libdb-4.2.so()(64bit) is needed by (installed) sendmail-8.13.1-2.x86_64 libdb-4.2.so()(64bit) is needed by (installed) apr-util-0.9.4-17.x86_64 libdb-4.2.so()(64bit) is needed by (installed) httpd-2.0.52-3.x86_64 libdb-4.2.so()(64bit) is needed by (installed) mod_perl-1.99_16-3.x86_64 libdb-4.2.so()(64bit) is needed by (installed) webalizer-2.01_10-25.x86_64 libdb-4.2.so()(64bit) is needed by (installed) db4-utils-4.2.52-6.x86_64Uh-oh, what now?
rpm -i db4-4.3.21-1.x86_64.rpmworked in this case. If all hell breaks loose, rpm -e it.
If you get other failed deps, try installing the correct version first (e.g. "yum install curl" fixed things when rpm whined about missing libcurl). Fall back on the development tree only when you have no other choice.
rpm -Uvh php-5.0.2-8.x86_64.rpm php-devel-5.0.2-8.x86_64.rpm php-mysql-5.0.2-8.x86_64.rpm php-pear-5.0.2-8.x86_64.rpm php-gd-5.0.2-8.x86_64.rpmand DONE! PHP 5, MySQL 4, and Fedora Core 3, all playing nicely together.