# MySQL Configuration Error

## signature16

I am trying to configure MySQL.  I followed the HowTO on the wiki.  After #emerge mysql, I typed:  #emerge --config =mysql-4.1.14

Then it asked me for a new password and I entered that.  

After configuring itself for a minute it threw these errors:

```
Support MySQL by buying support/licenses at https://order.mysql.com

Warning: Unable to load '//usr/share/zoneinfo/Asia/Riyadh87' as time zone. Skipp                                          ing it.

Warning: Unable to load '//usr/share/zoneinfo/Asia/Riyadh88' as time zone. Skipp                                          ing it.

Warning: Unable to load '//usr/share/zoneinfo/Asia/Riyadh89' as time zone. Skipp                                          ing it.

Warning: Unable to load '//usr/share/zoneinfo/Mideast/Riyadh87' as time zone. Sk                                          ipping it.

Warning: Unable to load '//usr/share/zoneinfo/Mideast/Riyadh88' as time zone. Sk                                          ipping it.

Warning: Unable to load '//usr/share/zoneinfo/Mideast/Riyadh89' as time zone. Sk                                          ipping it.

Warning: Unable to load '//usr/share/zoneinfo/iso3166.tab' as time zone. Skippin                                          g it.

Warning: Unable to load '//usr/share/zoneinfo/posix/Asia/Riyadh87' as time zone.                                           Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/posix/Asia/Riyadh88' as time zone.                                           Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/posix/Asia/Riyadh89' as time zone.                                           Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/posix/Mideast/Riyadh87' as time zo                                          ne. Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/posix/Mideast/Riyadh88' as time zo                                          ne. Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/posix/Mideast/Riyadh89' as time zo                                          ne. Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/right/Asia/Riyadh87' as time zone.                                           Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/right/Asia/Riyadh88' as time zone.                                           Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/right/Asia/Riyadh89' as time zone.                                           Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/right/Mideast/Riyadh87' as time zo                                          ne. Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/right/Mideast/Riyadh88' as time zo                                          ne. Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/right/Mideast/Riyadh89' as time zo                                          ne. Skipping it.

Warning: Unable to load '//usr/share/zoneinfo/zone.tab' as time zone. Skipping i                                          t.

. * Loading "zoneinfo" this step may require few seconds

 * done

```

How do i fix this?

----------

## signature16

Also when I type these commands I get the following errors:

```
linuxserver public_html # mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

linuxserver public_html # mysql>show databases;

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

```

----------

## th0th696

Same problem here any clues as to how to fix this?

----------

## kg

Strange.  Is mysqld running?

What do you have in /var/run/mysqld ?  anything?

From the mysql> prompt  what happens when you type \s (return) ?

----------

## th0th696

no it doesn't start at all,  and I have'nt changed a single thing from default.

----------

## BitJam

I just emerged MySQL and the install went smoothly.  I did get those time zone errors but I just ignored them.   I used the instructions here: http://www.gentoo.org/doc/en/mysql-howto.xml

After the configuration step did you run "/etc/init.d/mysql start"?

Once you get it working you will probably also want to add mysql to your default runlevel.

----------

## th0th696

definitely typed

/etc/init.d/mysql start

Weird thing is it doesn't throw an error unless you do:

/etc/init.d/mysql restart

at which point it complains about mysql NOT being started.

 :Shocked: 

----------

## kg

Can you post what messages you get when you do /etc/init.d/mysql restart ?

Just for sanity sake, check 

```
ps -ef | grep mysqld
```

and look in /var/run/mysqld to see if you have anything in there.

And while you are at it, look in /var/lib/init.d/started to see if you have a symlink for mysql in there.

----------

## jmbsvicetto

Hi.

Also take a look at /var/log/mysql/mysqld.err.

----------

## BitJam

You may need to do a "/etc/init.d/mysql zap" to make sure that the mysql service is in the stopped state.

I am more interested in the error messages you get when you try to do a "/etc/init.d/mysql start" after "/etc/init.d/mysql status" says that the service is in a stopped state.  There may not be anything informative printed to the screen but there might be some messages in /var/log/everything/current and more likely the error messages will show up in /var/log/mysql/mysqld.err.

----------

## th0th696

Not sure what I changed (getting frantic on my edits here).   But now mysql is throwing an error when starting, here's some of the output from stuff you guys suggested:

darth ~ # /etc/init.d/mysql zap

 * Manually resetting mysql to stopped state.

darth ~ # /etc/init.d/mysql start

 * Starting mysqld (/etc/mysql/my.cnf) ...

 * MySQL NOT started, proceding anyway                                         [ ok ]

darth ~ # /etc/init.d/mysql status

 * status:  started

darth ~ # cat /var/log/mysql/mysqld.err

cat: /var/log/mysql/mysqld.err: No such file or directory

darth ~ # cat /var/log/mysql.err       

cat: /var/log/mysql.err: No such file or directory

darth ~ # cat /var/log/everything/current

cat: /var/log/everything/current: No such file or directory

darth ~ # ps -ef | grep mysqld

root      6685  6491  0 18:34 pts/0    00:00:00 grep mysqld

----------

## BitJam

What does an "ls -l /var" and ls -l /var/log" give?

----------

## th0th696

darth ~ # ls -l /var/log

total 2284

-rw-r--r--  1 root    root      48077 Apr  9 20:34 Xorg.0.log

-rw-r--r--  1 root    root      47774 Apr  9 15:26 Xorg.0.log.old

-rw-r-----  1 root    root      15451 Dec 31  2002 dmesg

-rw-rw----  1 portage portage 1604271 Apr  9 16:59 emerge.log

-rw-------  1 root    root         32 Apr  9 16:49 faillog

-rw-r--r--  1 root    root      11347 Apr  9 16:50 kdm.log

-rw-------  1 root    root     287138 Apr  9 21:18 messages

-rw-r--r--  1 root    root       2851 Apr  9 16:57 scrollkeeper.log

-rw-rw-r--  1 root    utmp     128256 Apr  9 21:18 wtmp

-rw-r--r--  1 root    root       1525 Apr  9 15:18 xdm.log

darth ~ # ls -l /var

total 64

drwxr-xr-x   6 root root  4096 Apr  7 20:40 cache

drwxr-xr-x   3 root root  4096 Mar 28 13:31 darthbackups

drwxr-xr-x   4 root root  4096 Apr  3 16:34 db

drwxr-xr-x   2 root root  4096 Apr  4 06:30 empty

drwxr-xr-x  21 root root  4096 Apr  7 12:03 lib

drwxrwxr-x   3 root uucp  4096 Dec 31  2002 lock

drwxr-xr-x   2 root root  4096 Apr  9 15:29 log

drwx------   2 root root 16384 Apr  7 17:37 lost+found

lrwxrwxrwx   1 root root    15 Apr  7 18:02 mail -> /var/spool/mail

drwxr-xr-x   9 root root  4096 Apr  9 15:29 run

drwxr-xr-x   6 root root  4096 Mar 27 18:48 spool

drwxr-xr-x   2 root root  4096 Mar 26 14:39 state

drwxrwxrwt   5 root root  4096 Apr  9 15:02 tmp

drwxr-xr-x   3 root root  4096 Apr  3 16:18 www

EDIT:

Okay no clue what was wrong, but here's how I fixed it:

emerge --unmerge mysql

rm -R /etc/mysql

emerge mysql

I know I just gave up, but hey now it works.

 POST EDIT:

Nevermind still broken:

```

darth ~ # mysqladmin -u root version

mysqladmin: connect to server at 'localhost' failederror: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

darth ~ # eselect mysql list

Available MySQL versions:  (none found)              

darth ~ # /etc/init.d/mysql restart

 * Re-caching dependency info (mtimes differ)... * Stopping mysqld (/etc/mysql/my.cnf) ...                                     [ !! ]

darth ~ # /etc/init.d/mysql status

 * status:  started

```

[/code]

----------

## BitJam

I see several things that seem screwy to me.  But first, you should probably check the file /var/log/messages for error messages that got generated when trying to start mysql.  Do you have some sort of system logger installed?   If you are using sksklogd or syslog-ng then you might want to install logrotate.  I use metalog which doesn't need it.

The lack of /var/log/mysql is troubling.  When I go to the latest stable ebuild it says:

```
# minimal builds don't have the server

    if ! useq minimal; then

        [...]

        diropts "-m0755"

        dodir "/var/log/mysql"

        #touch ${D}/var/log/mysql/mysql.{log,err}

        #chmod 0660 ${D}/var/log/mysql/mysql.{log,err}

        keepdir "/var/log/mysql"

        chown -R mysql:mysql "${D}/var/log/mysql"
```

So the when you emerged mysql it should have created the /var/log/mysql directory for you.  Perhaps you were doing a minimal install which as the comment above says, does not install the server.  You can do the following to find out:

```
# emerge -pv mysql
```

Mine shows -minimal in the USE flags section.  If yours doesn't then you certainly have to disable the "minimal" USE flag in order to install the mysql server.

You can also use the "equery" command to look at all of the files that were installed with mysql.   It is a long list so you might want to grep the output.  For example, on my system I get:

```
# equery files mysql | grep ^/var

/var

/var/lib

/var/lib/mysql

/var/lib/mysql/.keep

/var/log

/var/log/mysql

/var/log/mysql/.keep

/var/run

/var/run/mysqld

/var/run/mysqld/.keep
```

----------

## th0th696

Silly me I didn't have a syslogger installed!  One of the consequences of the graphical installer has been that this was forgotten.

-minimal flag is there

Calculating dependencies ...done!

[ebuild   R   ] dev-db/mysql-4.1.14  +berkdb -big-tables -cluster -debug -doc -extraengine -geometry -minimal +perl +readline (-selinux) +ssl -static +tcpd -utf8 0 kB 

Total size of downloads: 0 kB

should I unmask a higher version? Not sure I would want to move to mysql 5 (any upgrade problems known?)

----------

## BitJam

I don't think a different version of mysql will help.  I am also using the latest stable mysql-4.1.14.

It seems that your emerge of mysql is failing miserably.  I would certainly suggest installing a sys logger and also installing gentoolkit (if you haven't already) so you can run "equery files mysql" and see what files portage thinks have been installed with mysql.

My approach would be to focus on why /var/log/mysql is missing but other people might have other approaches.  Certainly make sure you have the latest portage installed.  I have a directory /var/log/portage which contains detailed logs of every emerge.  I don't know why you don't have this directory.  Perhaps that information is in your emerge.log file but my emerge.log does not contain any details.

I think your emerges of mysql are failing.  If you had detailed log files I would suggest scouring them for any signs of an error in the mysql emerge.   Without detailed logs, you could try to emerge mysql yet again and then scroll back in the console/terminal window looking for something that has gone wrong.

You should also probably post the output of "emerge --info" just in case there is something obviously wrong or out of date there.

----------

## th0th696

Okay so now I have a syslogger installed, but no portage dir still?  But there is a emerge log?

darth ~ # ls -l /var/log

total 2484

-rw-r--r--  1 root    root      47774 Apr  9 22:26 Xorg.0.log

-rw-r--r--  1 root    root      47774 Apr  9 21:48 Xorg.0.log.old

-rw-r-----  1 root    root      15451 Jan  1  2003 dmesg

-rw-rw----  1 portage portage 1643298 Apr 10 11:55 emerge.log

-rw-------  1 root    root         32 Apr  9 16:49 faillog

-rw-r--r--  1 root    root      13385 Apr  9 22:26 kdm.log

-rw-------  1 root    root     485064 Apr 10 11:54 messages

drwxr-x---  2 mysql   mysql        67 Jan  1  2003 mysql

-rw-r--r--  1 root    root       2851 Apr  9 16:57 scrollkeeper.log

-rw-rw-r--  1 root    utmp     158976 Apr 10 11:54 wtmp

-rw-r--r--  1 root    root       1525 Apr  9 15:18 xdm.log

And 

equery files mysql

[ Searching for packages matching mysql... ]

* Contents of dev-db/mysql-4.1.14:

/etc

/etc/init.d

/etc/init.d/mysql

/etc/logrotate.d

/etc/logrotate.d/mysql

/etc/mysql

/etc/mysql/my.cnf

/etc/mysql/mysqlaccess.conf

/usr

/usr/bin

/usr/bin/comp_err

/usr/bin/isamchk

/usr/bin/isamlog

/usr/bin/msql2mysql

...................with tons more output which I can post if you want, but I already feel like I'm wasting database space here.

darth ~ # emerge --info

Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-gentoo-r7 x86_64)

=================================================================

System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+

Gentoo Base System version 1.6.14

ccache version 2.3 [enabled]

dev-lang/python:     2.4.2

sys-apps/sandbox:    1.2.12

sys-devel/autoconf:  2.13, 2.59-r7

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1

sys-devel/binutils:  2.16.1

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-mtune=athlon64 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-mtune=athlon64 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig ccache distlocks sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

MAKEOPTS=""

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X aac alsa amd64 apache2 audiofile avi berkdb bitmap-fonts blender-game bzip2 cdr cli config_wizard crypt css ctype cups curl dba dri dts dvd eds elibc_glibc emboss encode esd ethereal exif expat fam fastbuild ffmpeg flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml idn imagemagick imlib ipv6 isdnlog jack java jpeg junit kde kernel_linux lcms lzw lzw-tiff mad memlimit mjpeg mng mozilla mp3 mpeg mysql ncurses nls nptl ogg opengl pam pcre pdflib perl php png posix pppd python qt quicktime readline rtc samba sdl session simplexml soap sockets spell spl ssl tcltk tcpd threads tiff tokenizer truetype truetype-fonts type1-fonts udev usb userland_GNU userlocales vorbis xine xml xml2 xpm xsl xv xvid zlib"

Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

----------

## BitJam

I see the /var/log/mysql directory has finally decided to make an appearance.  If there is a mysqld.err file in there it might contain some error message that will help you track down the starting problem.

----------

## th0th696

darth mysql # cat mysqld.err 

/usr/sbin/mysqld: Can't create/write to file '/tmp/ibGb1Gox' (Errcode: 13)

030101  1:31:46  InnoDB: Error: unable to create temporary file; errno: 13

030101  1:31:46 [ERROR] Can't init databases

030101  1:31:46 [ERROR] Aborting

030101  1:31:46 [Note] /usr/sbin/mysqld: Shutdown complete

Well something at least.

I tried running 

mysql_install_db 

again just to make sure,  and it goes about its business without complaint (not really sure it worked, it just didn't complain about anything).  I get the feeling that it's something I've borked along the way.  Is there anything besides what's in /etc/mysql that I might have messed up?  I did rm -R /etc/mysql before the last emerge, so it should be default right now.

----------

## BitJam

Could be something is borked, but let's fix what is in front of us.  Do an "ls -ld /tmp".  Mine gives: 

```
$ ls -ld /tmp

drwxrwxrwt  6 root root 4096 Apr 10 10:04 /tmp
```

----------

## th0th696

darth ~ # ls -ld /tmp

drwxrwxr-x  6 root users 84 Apr 10 15:15 /tmp

Okay so why not 777 the darn thing

darth ~ # chmod 777 /tmp

darth ~ # ls -ld /tmp

drwxrwxrwx  6 root users 84 Apr 10 15:15 /tmp

darth ~ # /etc/init.d/mysql restart

 * Re-caching dependency info (mtimes differ)...

 * Stopping mysqld (/etc/mysql/my.cnf) ...                                     [ !! ]

darth ~ # cat /var/log/mysql/mysqld.err 

/usr/sbin/mysqld: Can't create/write to file '/tmp/ibGb1Gox' (Errcode: 13)

030101  1:31:46  InnoDB: Error: unable to create temporary file; errno: 13

030101  1:31:46 [ERROR] Can't init databases

030101  1:31:46 [ERROR] Aborting

030101  1:31:46 [Note] /usr/sbin/mysqld: Shutdown complete

/usr/sbin/mysqld: Can't create/write to file '/tmp/ibcNp7ay' (Errcode: 13)

030101  2:10:32  InnoDB: Error: unable to create temporary file; errno: 13

030101  2:10:32 [ERROR] Can't init databases

030101  2:10:32 [ERROR] Aborting

030101  2:10:32 [Note] /usr/sbin/mysqld: Shutdown complete

No luck  :Sad: 

----------

## jmbsvicetto

Try doing the following:

```
# chmod 1777 /var
```

The try again

```
# /etc/init.d/mysql restart
```

and check the logs.

----------

## BitJam

You should probably also do "chmod +t /tmp" to enable the sticky bit for your /tmp directory.

What does "ls -ld /" reveal? 

```
$ ls -ld /

drwxr-xr-x  21 root root 4096 Mar 10 22:44 /
```

----------

## th0th696

darth ~ # ls -ld /

drwxr-xr-x  23 root root 1024 Jan  1  2003 /

darth ~ # chmod 1777 /var

darth ~ # chmod +t /tmp

darth ~ # /etc/init.d/mysql restart

 * Re-caching dependency info (mtimes differ)...

 * Stopping mysqld (/etc/mysql/my.cnf) ...                                     [ !! ]

darth ~ # cat /var/log/mysql/mysql

mysql.err   mysql.log   mysqld.err  

darth ~ # cat /var/log/mysql/mysqld.err 

/usr/sbin/mysqld: Can't create/write to file '/tmp/ibGb1Gox' (Errcode: 13)

030101  1:31:46  InnoDB: Error: unable to create temporary file; errno: 13

030101  1:31:46 [ERROR] Can't init databases

030101  1:31:46 [ERROR] Aborting

030101  1:31:46 [Note] /usr/sbin/mysqld: Shutdown complete

/usr/sbin/mysqld: Can't create/write to file '/tmp/ibcNp7ay' (Errcode: 13)

030101  2:10:32  InnoDB: Error: unable to create temporary file; errno: 13

030101  2:10:32 [ERROR] Can't init databases

030101  2:10:32 [ERROR] Aborting

030101  2:10:32 [Note] /usr/sbin/mysqld: Shutdown complete

nothing new in mysqld.err, all that was there before.  :Shocked: 

----------

## BitJam

There can be trivial problems with doing a restart after a failed start.  Try: 

```
# /etc/init.d/mysql zap

# /etc/init.d/mysql start
```

If that doesn't work there should be something new in the error log.

----------

## th0th696

 :Smile:   :Very Happy:   :Surprised:   :Laughing: 

Yay!

The /etc/init.d/mysql zap  did the trick.  I am not exactly sure what fixed it, but I thank you all for your very generous help, as I was digging a hole here.  My guess it was the perms on /tmp that borked it, but who knows?

----------

## th0th696

okay so why does 

darth ~ # eselect mysql list

Available MySQL versions:

  (none found)      

show none found?

----------

## jmbsvicetto

 *th0th696 wrote:*   

> darth ~ # 
> 
> darth ~ # chmod 1777 /var
> 
> 

 

I'm very sorry, but I meant chmod 1777 /tmp.

You need to restore the correct permissions ASAP, to avoid problems.

```
atlantis@atl64 ~ $ ls -ld /var/

drwxr-xr-x 17 root root 440 2006-04-07 17:37 /var/

atlantis@atl64 ~ $  
```

So you should do chmod 0755 /var.

----------

## th0th696

double yikes I knew something seemed wrong with all my permissions being set wrong after a fresh install.  Can anyone verify that tmp should be 777 as well? or should I just 

gpass -a mysql users

and keep a 0755 on tmp as well?

Oh ya and I still can't get anything other than:

```

darth ~ # eselect mysql list 

Available MySQL versions: 

(none found) 

```

 :Sad: 

Edit:  And dangit I guess it would have to be 0775 to make that gpasswd trick work  :Rolling Eyes: 

----------

## BitJam

No, a 0755 on /tmp is what caused your problem in the first place.

I already posted what the permissions on /tmp should look like earlier in this thread.  You did a chmod 777 on it and then a +t which is what put it in the proper state and fixed your problem.  If you've mucked with it again just do a: 

```
# chmod a+rwxt /tmp
```

and all should be well.

MySQL runs with the permissions of the mysql user.  This user is not root and is not in the group root but still needs to write in /tmp.  Therefore /tmp needs to be writable by everyone.   This is the standard setting for /tmp.  The sticky bit (t) makes it illegal for users to delete other users' files in /tmp.

----------

## th0th696

ya thing is I had never changed tmp's perms on this box before the changes listed a few posts ago.  And this box was freshly installed last week.  Of course it is an amd64 box and the liveCd is supposed to be maybe more buggy than the regular install, and I did the ungentoo like thing and used the dang graphical installer, as I thought I was experienced enough to skip the install fun as I had done it so many times before (stupid me).  Okay and looking on another gentoo box for reference I see that indeed you are right tmp is root:root, but on this box it's root:users hence my earlier thinking that the gpasswd stuff might work.  I've got some weird things going on here, mysql thinks it's doing great mysql -p works normally and some basic calls work, but eselect still thinks I have no mysql.  Alas...

 :Confused: 

----------

## jmbsvicetto

From the following, have you tried to reinstall eselect-mysql and if that doesn't work, to reinstall mysql?

```
atl64 atlantis # equery belongs eselect

[ Searching for file(s) eselect in *... ]

app-admin/eselect-1.0 (/usr/bin/eselect)

app-admin/eselect-1.0 (/usr/share/eselect)

app-admin/eselect-opengl-1.0.3 (/usr/share/eselect)

app-admin/eselect-mysql-1.1.0 (/usr/share/eselect)

sys-devel/gcc-4.0.2-r3 (/etc/eselect)

sys-devel/gcc-3.4.5 (/etc/eselect)

dev-db/mysql-5.0.18-r30 (/var/lib/eselect)

atl64 atlantis # 
```

PS - For the record, chmod a+rwxt /tmp does almost the same as chmod 1777 /tmp. For this discussion it's effect is the same.

----------

## th0th696

Ya I think i've reinstalled mysql at least a couple of times but here's again just for kicks:

```

darth ~ # emerge -C eselect-mysql mysql &&  emerge mysql eselect-mysql

#and deleting mucho output where I did not notice any problems

darth ~ # eselect mysql listAvailable MySQL versions:

  (none found)              

```

 :Crying or Very sad: 

----------

## jmbsvicetto

 :Sad: 

What about reemerging eselect?

----------

## th0th696

```
emerge eselect
```

and same thing no mysql found.

Okay so I was wanting a quick sanity check, so installed mysql on a separate machine (beige PPC Mac G3) with the following:

```
emerge mysql

ebuild /var/db/pkg/dev-db/mysql-4.1.14/mysql-4.1.14.ebuild config

/etc/init.d/mysql start

/usr/bin/mysqladmin -u root -h localhost password 'xxx'

```

at which point it spits out the scary:

```
 # /usr/bin/mysqladmin -u root -h localhost password 'xxx'

/usr/bin/mysqladmin: connect to server at 'localhost' failed

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'

Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

```

Which seems to be the same problem, but tmp is 1777 already.  Okay now I'm getting worried, some define insanity as doing the same thing over and over and expecting different results.  Well that's me, I feel like a rat in a skinner box at the moment.  I keep pressing this lever knowing what's going to happen next, but I keep on doing the same thing.

 :Shocked: 

----------

## jmbsvicetto

Did you get any error? Please look at the /var/log/mysql/mysqld.err log file.

----------

## th0th696

Ok there is a system logger installed, but again no mysql directory in this ppc machine.  As another sanity check I reemerged syslog-ng and checked the perms on /var/log they were 0755.  Same problem two different architectures, two separate installs (this beige box has been running for years as a gaim chatbox), gotta be me that's the problem.  Am I leaving something out?

----------

## jmbsvicetto

Do you have the following?

```
atl64 atlantis # grep /var/log /etc/mysql*/my.cnf

/etc/mysql-500/my.cnf:err-log                                           = /var/log/mysql-500/mysql.err

/etc/mysql-500/my.cnf:log-error                                         = /var/log/mysql-500/mysqld.err

/etc/mysql/my.cnf:err-log                                               = /var/log/mysql/mysql.err

/etc/mysql/my.cnf:log-error                                     = /var/log/mysql/mysqld.err

atl64 atlantis # 
```

----------

## th0th696

```
grep /var/log /etc/mysql*/my.cnf

err-log                                         = /var/log/mysql/mysql.err

log-error                                       = /var/log/mysql/mysqld.err

```

definitely something rotten and I am pretty sure I'm not even close to denmark.

----------

## jmbsvicetto

As a desperate measure, you can try searching through the following for errors:

```
strace /etc/init.d/mysql restart &> log 
```

But be warned:

```
atl64 atlantis # strace /etc/init.d/mysql restart &> log; cat log | nl | tail

  4685  stat("/var/lib/init.d/scheduled/mysql", 0x7ffffff901d0) = -1 ENOENT (No such file or directory)

  4686  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

  4687  rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0

  4688  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

  4689  rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

  4690  read(255, "\nexit \"${retval}\"\n\n# vim:ts=4\n", 8192) = 30

  4691  rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

  4692  rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

  4693  exit_group(0)                           = ?

  4694  Process 814 detached

atl64 atlantis # 
```

----------

## th0th696

Okay so I've slacked off for a bit.  But on re-try I deleted everything I could think of that is created afer installation:

```

rm -R /etc/mysql

rm -R /var/lib/mysql

rm -R /var/log/mysql

```

and when I run emerge mysql now it hangs on this line everytime (and it hangs indefinitely):

checking "how to check if pid exists"...

creating the folders again has no effect so I removed them 

Any ideas?

----------

## jmbsvicetto

Try removing /var/run/mysql and /etc/init.d/mysql and doing rc-update del mysql.

----------

## th0th696

okay so at least mysql shows up and /etc/init.d/mysql status shows a healthy running mysql.

but

```

eselect mysql list

```

still shows none found.

----------

## jmbsvicetto

 *th0th696 wrote:*   

> o
> 
> ```
> 
> eselect mysql list
> ...

 

 :Confused:   :Confused: 

I have no idea, so I can't help you.

----------

## th0th696

What the heck does eselct do anyway?  The reason I was putting mysql on this machine was for mythtv, and it seems to be working now.  I just don't like loose ends like this, but for the moment it doesn't seem to matter.  Maybe it will work itself out in a later update.  Anyhow thanks for help to here,  you saved my sanity.  I'm still not sure what was wrong in the first place, but it definitely seemed like deleting those last two files and re-emerging did the trick.

----------

