>Description:

I'm sorry This is long, but it's because I've tried hard to fix this
myself; please bear with me.

Last week, for unknown reason, my root password for MySQL wasn't
working.  I may have changed it without updating the "/root/.my.cnf"
file.  So, I went to the online documentation (which is usually
excellent) and followed the instructions for resetting the password.
I first tried the one with the init-file and that didn't work, so then
I used the one where you skip the grant tables, and that didn't work
either.  I would update the mysql.user table, and I would see the
changed encrypted password, but the new password wouldn't work.

I should probably have stopped there, but seeing that there was a new,
stable version of MySQL (I was running 4.1.9), I decided to upgrade,
figuring that the instructions for setting the password would take
care of the problem.  In any event, I figured that you'd rather fix
the problem in 5.0.22.

So, I downloaded the RPM and installed it.  Here is the transcript:
# rpm -Uvh MySQL-server-standard-5.0.22-0.rhel3.i386.rpm
Preparing...                ########################################### [100%]
 
Giving mysqld a couple of seconds to exit nicely
   1:MySQL-server-standard  ########################################### [100%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h puma.wellesley.edu password 'new-password'
See the manual for more instructions.
 
NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
 
Please report any problems with the /usr/bin/mysqlbug script!
 
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
/usr/bin/mysqlcheck: unknown option '--check-upgrade'
This script updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.
 
This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION, stored procedures, or
more secure passwords in 4.1
 
Got a failure from command:
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql 
--no-defaults --force --user=mysql --host=localhost --database=mysql
Please check the above output and try again.
 
Running the script with the --verbose option may give you some information
of what went wrong.
 
If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option
Starting MySQL.[  OK  ]

#

Following your instructions, I started the server and ran the
password-setting command.  Here's the transcript:

# service mysql start
Starting MySQL                                             [  OK  ]
# mysqladmin -u root password 'blahblah'
mysqladmin: connect to server at 'puma' failed
error: 'Lost connection to MySQL server during query'
# ps -ef | grep mysql
root     12811     1  0 11:11 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe 
--datadir=/var/lib/mysql --pid-file=/var/lib/mysql/puma.wellesley.edu.pid
mysql    12832 12811  0 11:11 pts/0    00:00:00 /usr/sbin/mysqld --basedir=/ 
--datadir=/var/lib/mysql --user=mysql 
--pid-file=/var/lib/mysql/puma.wellesley.edu.pid --skip-locking

So, it looks like the server is running, but for some reason I can't
connect.  I've tried a bunch of other ways (such as starting it with
--skip-grant-tables) but no luck.  I've checked the error log, and
it's quite clean.  For example:

060801 11:39:31  mysqld started
060801 11:39:31  InnoDB: Started; log sequence number 0 81455176
060801 11:39:31 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.22-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  
MySQL Community Edition - Standard (GPL)

Interestingly, if I use "nmap", it shows that port 3306 is open, but
if I try to telnet to that port, it never responds.

>How-To-Repeat:

Start mysql server in the usual way, which yields no errors, then try
something as simple as

# mysqladmin -u root ping

This will hang for a very long time (several minutes) and eventually
say:

mysqladmin: connect to server at 'puma' failed
error: 'Lost connection to MySQL server during query'

>Fix:

None that I know of.  This is a real problem for me. 

>Submitter-Id:  <submitter ID>
>Originator:    root
>Organization:
  Wellesley College Computer Science
>MySQL support: none
>Synopsis:      can't connect to server and can't reset root password
>Severity:      critical
>Priority:      high
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-5.0.22-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:
        
System: Linux puma.wellesley.edu 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:38:41 EDT 
2006 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: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-56)
Compilation info: CC='gcc'  CFLAGS='-O2 -g -pipe -march=i386 -mcpu=i686'  
CXX='gcc'  CXXFLAGS='-O2 -g -pipe -march=i386 -mcpu=i686'  LDFLAGS=''  
ASFLAGS=''
LIBC: 
lrwxrwxrwx    1 root     root           13 Jul 25 18:20 /lib/libc.so.6 -> 
libc-2.3.2.so
-rwxr-xr-x    1 root     root      1512793 Jun 16 07:32 /lib/libc-2.3.2.so
-rw-r--r--    1 root     root      2468490 Jun 16 06:50 /usr/lib/libc.a
-rw-r--r--    1 root     root          204 Jun 16 06:36 /usr/lib/libc.so
Configure command: ./configure '--disable-shared' 
'--with-server-suffix=-standard' '--without-embedded-server' '--with-innodb' 
'--with-archive-storage-engine' '--without-bench' '--with-zlib-dir=bundled' 
'--with-big-tables' '--enable-assembler' '--enable-local-infile' 
'--with-mysqld-user=mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' 
'--with-pic' '--prefix=/' '--with-extra-charsets=complex' '--with-yassl' 
'--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--libdir=/usr/lib' 
'--sysconfdir=/etc' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' 
'--infodir=/usr/share/info' '--includedir=/usr/include' 
'--mandir=/usr/share/man' '--enable-thread-safe-client' '--with-comment=MySQL 
Community Edition - Standard (GPL)' '--with-readline' 'CC=gcc' 'CFLAGS=-O2 -g 
-pipe -march=i386 -mcpu=i686' 'CXXFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686' 
'CXX=gcc' 'LDFLAGS='


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

Reply via email to