Hi Tom

Looks like you had an earlier version that had a
datadir=/usr/local/mysql/data. The new version was expecting the data
directory to reside in /var/lib/mysql (that can be seen on your mysqld
processes and also the mysql_install_db output).

You can change this in the /etc/my.cnf
(http://dev.mysql.com/doc/refman/5.0/en/option-files.html) or on the
command line
(http://dev.mysql.com/doc/refman/5.0/en/server-options.html) to where
your real data lives. You can then run ./mysql_install_db and it will
create the database/tables in the correct spot.

Same problem with the socket. Different rpms/distributions put the
socket in different places and this was a little bit different. See
http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html

Regards


David Logan
Database Administrator
HP Managed Services
148 Frome Street,
Adelaide 5000
Australia

+61 8 8408 4273 - Work
+61 417 268 665 - Mobile
+61 8 8408 4259 - Fax


-----Original Message-----
From: tom wible [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 27 October 2005 10:13 AM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com; Michael McFadden; [EMAIL PROTECTED]; Sheldon
Robinson
Subject: Re: demon quits immediately...

well, i've got /var/lib/mysql:
[EMAIL PROTECTED] mysql]$ ll /var/lib/mysql/
total 20524
-rw-rw----  1 mysql mysql 10485760 Oct 24 18:38 ibdata1
-rw-rw----  1 mysql mysql  5242880 Oct 24 19:54 ib_logfile0
-rw-rw----  1 mysql mysql  5242880 Oct 24 18:38 ib_logfile1
-rw-rw----  1 mysql root      2102 Oct 24 19:54 tomsEmachine.err

and /usr/local/mysql/data/mysql:
[EMAIL PROTECTED] data]$ ll /usr/local/mysql/data
total 12
drwxr-x---  2 tomw mysql 4096 Oct 24 19:52 mysql
drwxr-x---  2 tomw mysql 4096 Oct 17 07:21 test
-rw-rw----  1 tomw mysql  666 Oct 24 19:54 tomsEmachine.err

note the identical datestamps on the 2 .err files...

anyway, i chown'd mysql:mysql /usr/local/mysql/data/mysql/* & reran 
scripts/mysql_install_db and got this:

[EMAIL PROTECTED] mysql]$ ./scripts/mysql_install_db
mkdir: cannot create directory `/var/lib/mysql/mysql': Permission denied
chmod: cannot access `/var/lib/mysql/mysql': No such file or directory
mkdir: cannot create directory `/var/lib/mysql/test': Permission denied
chmod: cannot access `/var/lib/mysql/test': No such file or directory
Installing all prepared tables
051026 19:59:20 [Warning] Can't create test file 
/var/lib/mysql/tomsEmachine.lower-test
Fill help tables
051026 19:59:20 [Warning] Can't create test file 
/var/lib/mysql/tomsEmachine.lower-test

so i
        chown'd mysql:mysql /usr/local/mysql (for some reason, i had 2
do that as root, 
even tho i owned the dir tree...wtf?-)
        su mysql
and ./scripts/mysql_install_db ran successfully, creating the
/var/lib/mysql 
datafiles.

and ./bin/mysqld_safe seems 2 have worked...

oh, wait: ./bin/mysqladmin -u root password '<newpassword>' gives me
this:

./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock'
exists!

bash-3.00$ ls -l /tmp/mysql.sock
ls: /tmp/mysql.sock: No such file or directory

bash-3.00$ ps -ef | grep mysql
root      2121  2092  0 20:15 pts/7    00:00:00 su mysql
mysql     2122  2121  0 20:15 pts/7    00:00:00 bash
mysql     2211  2122  0 20:21 pts/7    00:00:00 /bin/sh
./bin/mysqld_safe
mysql     2232  2211  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2233  2232  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2234  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2235  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2236  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2237  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2239  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2240  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2241  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2242  2233  0 20:21 pts/7    00:00:00
/usr/local/mysql/bin/mysqld 
--basedir=/usr/local/mysql --datadir=/var/lib/mysql 
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking 
--socket=/var/lib/mysql/mysql.sock
mysql     2294  2122  0 20:26 pts/7    00:00:00 ps -ef
mysql     2295  2122  0 20:26 pts/7    00:00:00 grep mysql

bash-3.00$ ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

fixed that;-)

oh, wait:
bash-3.00$ ./bin/mysqladmin -u root password '<new-passwd>'
bash-3.00$ ./bin/mysqladmin -u root -h tomsEmachine password
'<new-passwd>'
./bin/mysqladmin: connect to server at 'tomsEmachine' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

thanx 4 all the help...weird how there were 2 sets of db files, the
disconnect 
on the .sock, and then the password fubar...but then that's what makes
linux so 
much not-read4primetime-fun;-}




David Ziggy Lubowa wrote:
> change the group
> 
> 
> chown -R mysql.daemon  /dir/name
> 
> 
> try that
> 
> 
> On Tuesday 25 October 2005 16:05, Michael McFadden wrote:
>> Hi.
>>
>> Looks like the 'hosts' grant table is missing,
>> corrupt, or does not have permissions set correctly.
>>
>> My examples come from version 4.1  I hope they apply,
>> or at least point you in the right direction.
>>
>> My datadir is /var/lib/mysql - your's may be different
>>
>> within the datadir there is another directory 'mysql'
>> - (/var/lib/mysql/mysql/) these are where the grant
>> tables live.
>>
>> within that directory, you should have these:
>> -rw-rw----  1 mysql mysql 9064 2005-10-24 15:21
>> host.frm
>> -rw-rw----  1 mysql mysql    0 2005-10-24 15:21
>> host.MYD
>> -rw-rw----  1 mysql mysql 1024 2005-10-24 15:21
>> host.MYI
>>
>> make sure they
>> 1) exsist
>> 2) owned by the mysql user (in my case, 'mysql')
>> 3) readable, writeable by 'mysql' (of course)
>>
>> You can also attempt to rerun 'mysql_install_db' to
>> recreate the grant tables.
>>
>> Please read
>> http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html
>> for more information on the mysql_install_db script.
>>
>> Also, if you are upgrading from 4.1 to 5.0, you may
>> need to run 'mysql_fix_privelage_tables' to add
>> aditional columns to your existing tables.  This is
>> probably not the case, tho.
>>
>> Hope that helps you!
>>
>> -Mike
>>
>> --- tom wible <[EMAIL PROTECTED]> wrote:
>>>> Description:
>>> [EMAIL PROTECTED]
>>> mysql-standard-5.0.15-linux-i686]# Starting mysqld
>>> daemon with databases from
>>> /usr/local/mysql-standard-5.0.15-linux-i686/data
>>> STOPPING server from pid file
>> /usr/local/mysql-standard-5.0.15-linux-i686/data/tomsEmachine.pid
>>
>>> 051024 19:52:09  mysqld ended
>>>
>>> [EMAIL PROTECTED]
>>> mysql-standard-5.0.15-linux-i686]# cat
>>> /var/lib/mysql/tomsEmachine.err
>>> 051024 18:38:27  mysqld started
>>> InnoDB: The first specified data file ./ibdata1 did
>>> not exist:
>>> InnoDB: a new database to be created!
>>> 051024 18:38:28  InnoDB: Setting file ./ibdata1 size
>>> to 10 MB
>>> InnoDB: Database physically writes the file full:
>>> wait...
>>> 051024 18:38:28  InnoDB: Log file ./ib_logfile0 did
>>> not exist: new to be
>>> created
>>> InnoDB: Setting log file ./ib_logfile0 size to 5 MB
>>> InnoDB: Database physically writes the file full:
>>> wait...
>>> 051024 18:38:29  InnoDB: Log file ./ib_logfile1 did
>>> not exist: new to be
>>> created
>>> InnoDB: Setting log file ./ib_logfile1 size to 5 MB
>>> InnoDB: Database physically writes the file full:
>>> wait...
>>> InnoDB: Doublewrite buffer not found: creating new
>>> InnoDB: Doublewrite buffer created
>>> InnoDB: Creating foreign key constraint system
>>> tables
>>> InnoDB: Foreign key constraint system tables created
>>> 051024 18:38:29  InnoDB: Started; log sequence
>>> number 0 0
>>> 051024 18:38:29 [ERROR] Fatal error: Can't open and
>>> lock privilege
>>> tables: Table 'mysql.host' doesn't exist
>>> 051024 18:38:30  mysqld ended
>>>
>>> 051024 19:54:03  mysqld started
>>> 051024 19:54:03  InnoDB: Database was not shut down
>>> normally!
>>> InnoDB: Starting crash recovery.
>>> InnoDB: Reading tablespace information from the .ibd
>>> files...
>>> InnoDB: Restoring possible half-written data pages
>>> from the doublewrite
>>> InnoDB: buffer...
>>> 051024 19:54:03  InnoDB: Starting log scan based on
>>> checkpoint at
>>> InnoDB: log sequence number 0 36808.
>>> InnoDB: Doing recovery: scanned up to log sequence
>>> number 0 43655
>>> 051024 19:54:04  InnoDB: Starting an apply batch of
>>> log records to the
>>> database...
>>> InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12
>>> 13 14 15 16 17 18
>>> 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
>>> 36 37 38 39 40 41 42
>>> 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
>>> 60 61 62 63 64 65 66
>>> 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
>>> 84 85 86 87 88 89 90
>>> 91 92 93 94 95 96 97 98 99
>>> InnoDB: Apply batch completed
>>> 051024 19:54:04  InnoDB: Started; log sequence
>>> number 0 43655
>>> 051024 19:54:04 [ERROR] Fatal error: Can't open and
>>> lock privilege
>>> tables: Table 'mysql.host' doesn't exist
>>> 051024 19:54:04  mysqld ended
>>>
>>>> Submitter-Id:    airdrummer
>>>> Originator:    tom wible
>>>> Organization:
>>>> MySQL support: none
>>>> Synopsis:    demon quits immediately
>>>> Severity:   critical
>>>> Priority:    <[ low | medium | high ] (one line)>
>>>> Category:    mysql
>>>> Class:    sw-bug
>>>> Release:    mysql-5.0.15-standard (MySQL Community
>>> Edition - Standard
>>> (GPL))
>>>
>>>> C compiler:    gcc (GCC) 3.2.3 20030502 (Red Hat
>>> Linux 3.2.3-52)
>>>
>>>> C++ compiler:  gcc (GCC) 3.2.3 20030502 (Red Hat
>>> Linux 3.2.3-52)
>>>
>>>> Environment:
>>>     <machine, os, target, libraries (multiple
>>> lines)>
>>> System: Linux tomsEmachine 2.6.11-1.1369_FC4 #1 Thu
>>> Jun 2 22:55:56 EDT
>>> 2005 i686 i686 i386 GNU/Linux
>>> Architecture: i686
>>>
>>> Some paths:  /usr/bin/perl /usr/bin/make
>>> /usr/bin/gmake /usr/bin/gcc
>>> /usr/bin/cc
>>> GCC: Using built-in specs.
>>> Target: i386-redhat-linux
>>> Configured with: ../configure --prefix=/usr
>>> --mandir=/usr/share/man
>>> --infodir=/usr/share/info --enable-shared
>>> --enable-threads=posix
>>> --enable-checking=release --with-system-zlib
>>> --enable-__cxa_atexit
>>> --disable-libunwind-exceptions
>>> --enable-libgcj-multifile
>>> --enable-languages=c,c++,objc,java,f95,ada
>>> --enable-java-awt=gtk
>> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
>>
>>> --host=i386-redhat-linux
>>> Thread model: posix
>>> gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)
>>> Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'
>>> CXXFLAGS=''
>>> LDFLAGS=''  ASFLAGS=''
>>> LIBC:
>>> lrwxrwxrwx  1 root root 13 Jun 19 21:47
>>> /lib/libc.so.6 -> libc-2.3.5.so
>>> -rwxr-xr-x  1 root root 1489572 May 30 08:05
>>> /lib/libc-2.3.5.so
>>> -rw-r--r--  1 root root 2523698 May 30 08:44
>>> /usr/lib/libc.a
>>> -rw-r--r--  1 root root 238 May 30 07:10
>>> /usr/lib/libc.so
>>> lrwxrwxrwx  1 root root 10 Jun 19 23:31
>>> /usr/lib/libc-client.a -> c-client.a
>>> lrwxrwxrwx  1 root root 16 Jun 19 23:31
>>> /usr/lib/libc-client.so ->
>>> libc-client.so.0
>>> -rwxr-xr-x  1 root root 773464 Mar  2  2005
>>> /usr/lib/libc-client.so.0
>>> Configure command: ./configure
>>> '--prefix=/usr/local/mysql'
>>> '--localstatedir=/usr/local/mysql/data'
>>> '--libexecdir=/usr/local/mysql/bin'
>>> '--with-comment=MySQL Community
>>> Edition - Standard (GPL)'
>>> '--with-extra-charsets=complex'
>>> '--with-server-suffix=-standard'
>>> '--enable-thread-safe-client'
>>> '--enable-local-infile' '--enable-assembler'
>>> '--disable-shared'
>>> '--with-big-tables' '--with-readline'
>>> '--with-archive-storage-engine'
>>> '--with-innodb' 'CC=gcc' 'CXX=gcc'
>>>
>>>
>>>
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/[EMAIL PROTECTED]
>> __________________________________
>> Yahoo! FareChase: Search multiple travel sites in one click.
>> http://farechase.yahoo.com
> 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to