LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-06-2005, 01:47 PM   #16
GeneralChaos
Member
 
Registered: Jun 2005
Posts: 50

Original Poster
Rep: Reputation: 15

for the operation not permitted, if I just typed "su mysql" instead of "su - mysql" it worked fine.
 
Old 10-06-2005, 02:00 PM   #17
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Quote:
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
 
Old 10-06-2005, 02:13 PM   #18
GeneralChaos
Member
 
Registered: Jun 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Well I just tried the slackbuild and the same problem persists.... mysql.sock is nowhere to be found. what gives?
 
Old 10-06-2005, 03:12 PM   #19
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Did you:

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.
 
Old 10-07-2005, 12:01 PM   #20
GeneralChaos
Member
 
Registered: Jun 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by shilo
Did you:

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
And it sits there untill I hit ctrl+c.

I have to be missing something in the steps.
 
Old 10-07-2005, 01:11 PM   #21
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Quote:
Originally posted by GeneralChaos


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.

***EDIT***
Another thought:

Have you messed around with /etc/my.cnf?

Last edited by shilo; 10-07-2005 at 02:05 PM.
 
Old 10-11-2005, 01:34 PM   #22
happyg13
LQ Newbie
 
Registered: Nov 2004
Location: Colorado, USA
Distribution: Slackware & openSUSE
Posts: 12

Rep: Reputation: 0
Hope this thread is not dead. I have exact same problem on new home machine I am setting up - maybe some of my particulars will help solve this.

My configuration:

- Slack 10.2 (download 2 CDs)
- Installed kernel-generic-2.6.13
- Installed latest Dropline 2.12
- Have PHP 4.4.0 and Apache 1.3.33 running

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.

_______
happyg
 
Old 10-11-2005, 01:39 PM   #23
GeneralChaos
Member
 
Registered: Jun 2005
Posts: 50

Original Poster
Rep: Reputation: 15
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
 
Old 10-12-2005, 07:40 PM   #24
happyg13
LQ Newbie
 
Registered: Nov 2004
Location: Colorado, USA
Distribution: Slackware & openSUSE
Posts: 12

Rep: Reputation: 0
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.

_______
happyg

Last edited by happyg13; 10-12-2005 at 07:42 PM.
 
Old 10-15-2005, 07:29 AM   #25
kaon
Member
 
Registered: Dec 2003
Location: Hong Kong SAR
Distribution: Slackware 9.1, 10.x, slackware-current
Posts: 186

Rep: Reputation: 30
I just figured out I could not go to mysql as a regular user (Login is successful if I use root account). It shows:

Quote:
tsun@visio:~$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (13)
however, mysql.sock is created when I started mysql daemon as root.

Any ideas?

Thanks.
 
Old 10-18-2005, 02:30 PM   #26
GeneralChaos
Member
 
Registered: Jun 2005
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
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.

Here are my exact steps.

1) Login as root

2) wget http://www2.linuxpackages.net/packag...-i486-1jim.tgz

3) removepkg *any mysql package installed*

4) installpkg mysql-4.1.7-i486-1jim.tgz

5) chmod 755 /etc/rc.d/rc.mysqld

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.
 
Old 10-18-2005, 02:58 PM   #27
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Code:
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.
 
Old 10-18-2005, 03:05 PM   #28
GeneralChaos
Member
 
Registered: Jun 2005
Posts: 50

Original Poster
Rep: Reputation: 15
I have slack 10.0

I want ANY mysql to work.

I went to linuxpackages.net, searched for mysql with 10.0 selected, and downloaded the newer of the 2 versions. I assume it was made for 10.0

if I have to build a package and that requires the CD, I guess ill have to wait untill im home (never). I do most of this remotely.
 
Old 10-18-2005, 03:19 PM   #29
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You don't need the CD if you've access to Internet: http://mirror.switch.ch/ftp/mirror/s...urce/ap/mysql/
 
Old 10-18-2005, 04:27 PM   #30
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Quote:
Originally posted by GeneralChaos
I have slack 10.0

I want ANY mysql to work.

I went to linuxpackages.net
Easy solution. Don't use LinuxPackages.net. Period.

Seems easier than other methods? If you like to gamble, sure.

If you want a package for Slackware 10 that works, go here:

http://slackware.it/en/pb/download.p...-4.0.20-i486-1

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-07-2008 11:48 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration