SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
for the operation not permitted, if I just typed "su mysql" instead of "su - mysql" it worked fine.
Take this opportunity to fix the pty setup now, anyway.
Quote:
ok heres an update.
I uninstalled all mysql packages, downloaded an older 4.0 source and compiled all that
I edited the /etc/my.cnf file so that it points where I wanted it to. I then, what appeared to be, successfully installed the database. (didnt see any errors).
now I get
code:
root@GhettoVandalists:/# /usr/local/bin/mysqld_safe &
[1] 7258
root@GhettoVandalists:/# Starting mysqld daemon with databases from /mysqldata/data/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
051006 02:42:32 mysqld ended
Problem now seems to be is im supposed to have a sock and this pid file in a directory that I dont even have. Where am I supposed to get mysql.sock and this .pid file from? If I can get them I may be able to just create the directory, put them in there, and have it work.
Follow my advice. Go get the SlackBuild for MySQL. It's at any mirror. Get the one from current. Then get the source for the version specified in the SLackBuild. Then, build your own with the SlackBuild.
hte .pid and .sock are generated by MySQL. Look at the SlackBuild (highlighted for your convienience).
Code:
#!/bin/sh
# Build and install MySQL on Slackware
# by: David Cantrell <david@slackware.com>
# Currently maintained by: Patrick Volkerding <volkerdi@slackware.com>
CWD=`pwd`
TMP=${TMP:-/tmp}
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
PKG=$TMP/package-mysql
rm -rf $PKG
mkdir -p $PKG
VERSION=4.1.14
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
cd $TMP
rm -rf mysql-$VERSION
tar xjvf $CWD/mysql-$VERSION.tar.bz2
cd mysql-$VERSION
chown -R root.root .
find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" CXX=gcc CXXFLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
./configure \
--prefix=/usr \
--with-mysqld-user=mysql \
--with-unix-socket-path=/var/run/mysql/mysql.sock \
--localstatedir=/var/lib/mysql \
--enable-assembler \
--with-raid \
--without-debug \
--enable-thread-safe-client \
--without-bench \
--with-extra-charsets=complex \
--with-vio \
--with-openssl \
--program-prefix="" \
--program-suffix="" \
$ARCH-slackware-linux
#
# --without-readline
make -j3
make install DESTDIR=$PKG
# Strip ELF objects:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/etc
( cd support-files
cp my-huge.cnf my-large.cnf my-medium.cnf my-small.cnf $PKG/etc )
# install docs
mkdir -p $PKG/usr/doc/mysql-$VERSION/Docs
# Don't need the (huge) INSTALL-SOURCE... the source is installed already.
#cp -a COPYING* INSTALL-SOURCE MIRRORS README /usr/doc/mysql-$VERSION
cp -a COPYING* MIRRORS README $PKG/usr/doc/mysql-$VERSION
( cd Docs
cp -a INSTALL-BINARY *.html *.txt Flags \
$PKG/usr/doc/mysql-$VERSION/Docs )
# Also too large to justify since the .html version is right there:
rm $PKG/usr/doc/mysql-$VERSION/Docs/manual.txt
find $PKG/usr/doc/mysql-$VERSION -type f -exec chmod 644 {} \;
# this is the directory where databases are stored
mkdir -p $PKG/var/lib/mysql
chown mysql.mysql $PKG/var/lib/mysql
chmod 750 $PKG/var/lib/mysql
# this is where the socket is stored
mkdir -p $PKG/var/run/mysql
chown mysql.mysql $PKG/var/run/mysql
chmod 755 $PKG/var/run/mysql
# Do not include the test suite:
rm -r $PKG/usr/mysql-test
# Add init script:
mkdir -p $PKG/etc/rc.d
# This is intentionally chmod 644.
zcat $CWD/rc.mysqld.gz > $PKG/etc/rc.d/rc.mysqld.new
# Install script:
mkdir -p $PKG/install
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
# Add some handy library symlinks:
if [ -r $PKG/usr/lib/mysql/libmysqlclient.so.14 ]; then
( cd $PKG/usr/lib
rm -f libmysqlclient.so libmysqlclient.so.14
ln -sf mysql/libmysqlclient.so .
ln -sf mysql/libmysqlclient.so.14 .
)
fi
if [ -r $PKG/usr/lib/mysql/libmysqlclient_r.so.14 ]; then
( cd $PKG/usr/lib
rm -f libmysqlclient_r.so libmysqlclient_r.so.14
ln -sf mysql/libmysqlclient_r.so .
ln -sf mysql/libmysqlclient_r.so.14 .
)
fi
# Packaging standards:
chown -R root.bin $PKG/usr/bin
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
gzip -9 $PKG/usr/man/man?/*.?
# Build package:
cd $PKG
makepkg -l y -c n $TMP/mysql-$VERSION-$ARCH-$BUILD.tgz
if [ "$1" == "--cleanup" ]; then
cd $TMP
rm -rf mysql-$VERSION
fi
1) Use the SlackBuild to build a package (no errors)
2) Remove all of the old MySQL packages (removepkg)
3) Make sure no other instances of mysql are running ("ps asux |grep -i sql")
4) Use installpkg to install the package that you made
5) Follow the instructions in /etc/rc.d/rc.mysql
6) run "/etc/rc.d/rc.mysql start"
This creates /var/run/mysql/mysql.sock for me every time.
for me its more like
1) Remove packages (removepkg)
2) installpkg (I dont understand your step 1 because they come as tgz files)
3) ps asux |grep -i sql does not work for me, but from what I can gather it is not running, however I could be wrong.
5) Do what rc.mysql says
6) Run rc.mysql start and get the following
Code:
root@GhettoVandalists:/var/run/mysql# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
051007 00:59:22 mysqld ended
2) installpkg (I dont understand your step 1 because they come as tgz files)
<SNIP>
I have to be missing something in the steps.
Do you understand that the SlackBuild script builds a tgz file?
Make a directory. Put the script in thast directory, along with the slack.desc and the source. cd to the directory. Run the script. Look in /tmp. There's the package for you to install.
This is my first attempt at Slack's MySQL and I decided to not cobble things. Its a non-production box and I can wait a few weeks before I really need MySQL.
Note: I am not running X while trying to get MySQL working.
thread isnt dead quite yet, I just havent had time to mess around with the server and see what this slackbuild stuff is all about. im sure i'll be back lol
Well, got my problem fixed... Everything was clean from my 'full' Slack 10.2 install, so I figured it had to be something simple for me. Was hoping it was not a dropline inflicted prob.
My error after starting mysql was:
"STOPPING server from pid file /var/lib/mysql/fullpint2.pid"
Found that I needed to set access as root:
# cd /var/lib
# chown -R mysql:mysql mysql
This did it - I them moved on and set mysql to start at boot:
# chmod +x /etc/rc.d/rc,mysqld
Hope this info helps somebody else who is just starting out with mysql on Slack.
Originally posted by shilo Do you understand that the SlackBuild script builds a tgz file?
Make a directory. Put the script in thast directory, along with the slack.desc and the source. cd to the directory. Run the script. Look in /tmp. There's the package for you to install.
***EDIT***
Another thought:
Have you messed around with /etc/my.cnf?
I figured it built a tgz file, but I think that step should be useless if im downloading tgz files shouldnt it?
I still cant get this to work, no mysql.sock file anywhere to be found. and that "ps asux |grep -i sql" command doesnt work for me.
6) su - mysql (even though it gives me that "operation not permitted" line still)
7) mysql_install_db (not giving me any errors)
8) /etc/rc.d/rc.mysqld start
and then I get
Code:
mysql@GhettoVandalists:~$ Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
051018 03:28:43 mysqld ended
untill I hit ctrl+c
Am I just a complete noob or is something awry here? maybe I should just install slack 10.2 or something
Last edited by GeneralChaos; 10-18-2005 at 02:32 PM.
I figured it built a tgz file, but I think that step should be useless if im downloading tgz files shouldnt it?
Here's what I think:
You have an older Slackware install
You want a newer MySQL
So far, so good?
You have tried the package from LinuxPackages.net
It's busted.
Still right?
My suggestion then, is to use the SlackBuild to create your own package. This will create a MySQL package identical to the one in Slackware 10.2, with one important difference; it will only be using the libraries you currently have installed.
SO, the useless step is installing a tgz that you downloaded from a third party that is already known not to work on your system. The SlackBuild provides a simple means for creating the package yourself.
That is an official Slackware Mirror. The package is the official package for Slackware 10.
Remove all of the MySQL junk that you now have on your system (removepkg + rm the databases that you have installed).
Use installpkg to install the GOOD mysql package.
Follow the steps in /etc/rc.d/rc.mysql
Don't worry about the "operation not permitted" message. If it bothers you, look in /etc/profile for a line that says "biff=y" and comment it out. Biff doesn't play well with others.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.