Hey jlasman - Mysql update problem!

jwnetsource

Verified User
Joined
Nov 12, 2009
Messages
59
Location
Southeast Michigan
Jeff,

I am still unable to change my MySQL version from 5.0.51a.

I have done the following:

Changed the options in options.conf
#Possible values - 5.0, 5.1
mysql=5.1
mysql_inst=yes
mysql_backup=yes​

Did the following:./build update
./build mysql
./build php n

That diodn't work so I did:
./build rewrite_confs
./build update
./build all d​

That didn't work so out of desperation I did:
./build apache
./build php n​

the MySQL database is still 5.0.51a.

So what am i not doing correctly? If it matters, FreeBSD 7.2-CURRENT.

Thanks
 
Please post the output of:
Code:
mysql -V

Code:
ls -l /usr/local | grep mysql
 
Why me :)?

Martynas is the gent who wrote CustomBuild. He's probably best suited to give you an answer.

My gut feeling is that you've got an original install from your distribution and you're running MySQL but your server still sees the old distribution.

So I'd guess you should make sure any distribution versions of MySQLD are removed, then run the custombuild install again.

Jeff
 
Code:
$ mysql -V
mysql  Ver 14.14 Distrib 5.5.4-m3, for portbld-freebsd7.2 (i386) using  5.2

$ ls -l /usr/local | grep mysql
drwxr-xr-x  13 mysql     mysql           512 May 22 22:26 mysql
drwxr-xr-x  13 7155      10              512 May  6 18:21 mysql-5.1.47-freebsd7.0-i386
-rw-r--r--   1 root      wheel     156544039 May  6 18:25 mysql-5.1.47-freebsd7.0-i386.tar.gz
drwxr-xr-x  13 mysql     mysql           512 May 22 22:26 mysql-5.1.47-freebsd7.2-i386
-rw-r--r--   1 root      staff      45651453 May 22 22:26 mysql-5.1.47-freebsd7.2-i386.tar.gz

The first thing I did (the start of this journey) was attempt to install an update from the FreeBSD ports for mysql55-client and mysql55-server.

After trying to upgrade from ports, to no avail, I learned of the "options.conf" and "build". It appeared that ./build went to the DirectAdmin server and built 5.1.47.



Code:
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 5.0.51a   |
+-----------+
1 row in set (0.00 sec)


Code:
mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| protocol_version        | 10                  |
| version                 | 5.0.51a             |
| version_comment         | Source distribution |
| version_compile_machine | i386                |
| version_compile_os      | unknown-freebsd7.0  |
+-------------------------+---------------------+
5 rows in set (0.00 sec)

Code:
mysql> status;
--------------
mysql  Ver 14.14 Distrib 5.5.4-m3, for portbld-freebsd7.2 (i386) using  5.2

Connection id:          548
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          more
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.51a Source distribution
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /tmp/mysql.sock
Uptime:                 11 hours 24 min 51 sec

Threads: 1  Questions: 9823  Slow queries: 0  Opens: 36  Flush tables: 1  Open tables: 30  Queries per second avg: 0.239

daveyw - there are no errors.

jlasman - 'cuz your the man!

Thanks for the interest.
 
Try running "make deinstall" from the MySQL port directory, then run "./build mysql" again.
 
Try running "make deinstall" from the MySQL port directory, then run "./build mysql" again.

Nope. Tried as suggested and still 5.0.51a

BUT.....

Keep in mind when reading that this is a FreeBSD server not Linux. Linux sometimes puts things in different places than does FreeBSD. Could this be a problem for ./build or does the script deal with that ok?

mysql is nolonger in the path. Can't access mysql via the CL without specifying the full path. On my server mysql 5.0.51a is in: /usr/local/mysql/bin (DirectAdmin original install).

ALTHOUGH.....

mysql is running and functioning after system reboot (notice the location of mysqld).

Code:
# ps -auwx | grep mysql
mysql       828  0.0  4.2 46280 21496  ??  I    11:32AM   0:00.82 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=
root        743  0.0  0.3  3464  1408 con- I    11:32AM   0:00.01 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql --datadir=/
root       3189  0.0  0.2  1660  1060  p0  D+   12:22PM   0:00.00 grep mysql
#


After running ./build mysql (today) script message was to run ./build php n, which I did.


./build creates the May 25 stuff below in /usr/local/:

Code:
drwxr-xr-x   2 root      wheel          5120 May 25 11:06 bin
drwxr-xr-x   7 diradmin  diradmin        512 May 22 22:02 directadmin
drwxr-xr-x   7 root      wheel           512 May 22 20:37 etc
drwxr-xr-x  14 root      wheel          1536 May 25 10:42 include
drwxr-xr-x   2 root      wheel           512 May 25 10:42 info
drwxr-xr-x  13 root      wheel          3072 May 25 11:06 lib
drwxr-xr-x   6 root      wheel           512 May 22 20:08 libdata
drwxr-xr-x   2 root      wheel           512 May 25 10:42 libexec
drwxr-xr-x  36 root      wheel          1024 May 22 20:23 man
drwxr-xr-x  13 mysql     mysql           512 May 25 11:00 mysql
drwxr-xr-x  13 7155      10              512 May  6 18:21 mysql-5.1.47-freebsd7.0-i386
-rw-r--r--   1 root      wheel     156544039 May  6 18:25 mysql-5.1.47-freebsd7.0-i386.tar.gz
drwxr-xr-x  13 mysql     mysql           512 May 25 11:00 mysql-5.1.47-freebsd7.2-i386
-rw-r--r--   1 root      staff      45652405 May 25 11:00 mysql-5.1.47-freebsd7.2-i386.tar.gz
drwxr-xr-x   2 root      wheel           512 May 22 20:37 sbin
drwxr-xr-x  31 root      wheel          1024 May 25 10:42 share
drwxr-xr-x   4 root      wheel           512 Apr 16  2006 sysbk
drwxr-xr-x   2 root      wheel           512 Nov  6  2009 www

In /usr/local/mysql/

Code:
-rw-r--r--  1 mysql  mysql  19071 Jan 11  2008 COPYING
-rw-r--r--  1 mysql  mysql   5139 Jan 11  2008 EXCEPTIONS-CLIENT
-rw-r--r--  1 mysql  mysql   8792 Jan 11  2008 INSTALL-BINARY
-rw-r--r--  1 mysql  mysql   1410 Jan 11  2008 README
drwxr-xr-x  2 mysql  mysql   1536 Feb  5 02:45 bin
-rwxr-xr-x  1 mysql  mysql    801 Mar  3  2008 configure
[COLOR="red"]lrwxr-xr-x  1 root   mysql     11 May 25 11:00 data -> /home/mysql[/COLOR]
drwxr-xr-x  2 mysql  mysql    512 May 20  2009 docs
drwxr-xr-x  2 mysql  mysql   1536 May 20  2009 include
drwxr-xr-x  2 mysql  mysql    512 May 20  2009 lib
drwxr-xr-x  4 mysql  mysql    512 May 20  2009 man
[COLOR="Red"]lrwxr-xr-x  1 root   mysql     20 May 21 15:20 mysql -> /usr/local/bin/mysql
lrwxr-xr-x  1 root   mysql     28 May 21 16:03 mysql-5.1.47-freebsd7.0-i386 -> mysql-5.1.47-freebsd7.0-i386
lrwxr-xr-x  1 root   mysql     28 May 22 17:27 mysql-5.1.47-freebsd7.2-i386 -> mysql-5.1.47-freebsd7.2-i386[/COLOR]
drwxr-xr-x  8 mysql  mysql    512 May 20  2009 mysql-test
drwxr-xr-x  2 mysql  mysql    512 May 20  2009 scripts
drwxr-xr-x  3 mysql  mysql    512 May 20  2009 share
drwxr-xr-x  5 mysql  mysql   1024 May 20  2009 sql-bench
drwxr-xr-x  2 mysql  mysql    512 May 20  2009 support-files
drwxr-xr-x  2 mysql  mysql    512 May 20  2009 tests

In /usr/local/bin/ there is no mysql
Code:
--snip--
-r-xr-xr-x  1 root  wheel     21152 May 22 20:08 msgunfmt
-r-xr-xr-x  1 root  wheel     12840 May 22 20:08 msguniq
lrwxr-xr-x  1 root  wheel        33 May 25 11:00 mysql_config -> /usr/local/mysql/bin/mysql_config
-r-xr-xr-x  1 root  wheel     29444 May 22 20:08 ngettext
-r-xr-xr-x  1 root  wheel     10620 May 22 19:58 p5prove
--snip--

As an FYI, /usr/local/etc/rc.d/mysqld:

Code:
# cat mysqld
#!/bin/sh

[COLOR="Red"]DB_DIR=/usr/local/mysql/data[/COLOR]
PIDFILE=${DB_DIR}/`/bin/hostname -s`.pid
PROGNAME=mysqld

# Source function library
. /usr/local/etc/rc.d/functions

case "$1" in
        start)
                cd /usr/local/mysql
                if [ -x /usr/local/mysql/bin/mysqld_safe ]; then
                        /usr/bin/limits -U mysql \
                        /usr/local/mysql/bin/mysqld_safe --user=mysql --datadir=${DB_DIR} --pid-file=${PIDFILE} > /dev/null &
                        if [ $? -ne 0 ]
                        then
                                echo -e 'Starting mysqld:\t\t[ FAILED ]'
                        else
                                echo -e 'Starting mysqld:\t\t[ OK ]'
                        fi
                fi
                ;;
        stop)
                if [ -f ${PIDFILE} ]; then
                        /bin/kill `cat ${PIDFILE}` > /dev/null 2>&1 && echo -e "Stopping mysqld:\t\t[ OK ]"
                else
                        echo -e "Stopping mysqld:\t\t[ FAILED ]"
                fi
                ;;
        restart)
                $0 stop
                $0 start
                ;;
        status)
                status $PROGNAME
                ;;
        *)
                echo ""
                echo "Usage: `basename $0` { start | stop | restart }"
                echo ""
                exit 64
                ;;
esac
 
Last edited:
It seems that /usr/local/mysql is not a symlink :) Try the following:
Code:
cd /usr/local/directadmin/custombuild
./build update
mv /usr/local/mysql /usr/local/mysql_backup
./build mysql
 
Thanks smtalk. I appreciate you hanging in there.

It is now using 5.1.47 as it should.

I thought the process would create a /usr/local/mysql directory but it did not.

The CL line doesn't work as it used to so I created a link in /usr/local/bin
Code:
mysql -> /usr/local/mysql-5.1.47-freebsd7.2-i386/bin/mysql

But that didn't work as expected. I got:

Code:
mysql -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I'm suspecting the link is either to the the wrong "mysql" or something else is afoot.
 
Is MySQL running? Please post the output of:
Code:
ps aux | grep mysql
 
I thought it was, but it did not/would not start.

So, I did this:
Code:
./build rewrite_confs
./build update
./build all d

Mysql is running:

Code:
# ps -auwx | grep mysql
mysql       863  0.0  4.1 47412 20956  ??  S     6:23PM   0:00.40 /usr/local/mysql-5.1.47-freebsd7.2-i386/bin/mysqld --basedir=/usr
root        743  0.0  0.3  3464  1468 con- I     6:23PM   0:00.01 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql --datadir=/
root       2729  0.0  0.1  1660   756  p0  D+    6:35PM   0:00.00 grep mysql
#

Now roundcube is broken.



ProAirman is wordpress and uses mysql. It works fine.

Seems like I'm chasing my tail here. But with great appreciation for your time. :-)
 
Last edited:
Check your harddisk is not full, maybe there is no space left so the file in /tmp can't be created.

Also you could try to update roundcube.
 
Eh? You're saying that updating roundcube resolved problems with MySQL? You've got me confused. ???

Jeff
 
Hi Jeff.

Sorry I wasn't clear.

Code:
./build rewrite_confs
./build update
./build all d

fixed several problems, which included mysql. But it broke roundcube.

I updated roudcube to 0.4-beta, which gave me roundcube, with problems.

Tailend of this post (link below) explains.


I haven't resolved the roundcube problem, and can't ask on the roundcube forum, since their forum won't reply to my registration (email verification to post), nor has the webmaster (yet). Been several hours.

Cheers.
 
I understand now; it's never a good idea to change problem mid-thread :).

I may be having a similar problem; if I do I'll open a thread about Roundcube if one doesn't already exist. (I haven't had time to check yet, but looks like a Roundcube problem).
SERVICE CURRENTLY NOT AVAILABLE!
Error No. [500]
Jeff
 
Back
Top