[Koha-devel] Re: mysql crash...please help

Ambrose Li <acli@ada.dhs.org> via forwarder news-misc at ada.dhs.org
Wed Jan 29 08:02:02 CET 2003


Hi, Benedict,

In article <1043850368.1121.14.camel at localhost.localdomain>,
Benedict  <kb2qzv at poczta.wp.pl> wrote:
>
>Now I get this while trying to mysqladmin:
>[root at localhost koha-RC1]# mysqladmin reload
>mysqladmin: connect to server at 'localhost' failed
>error: 'Access denied for user: 'root at localhost' (Using password: NO)'
>[root at localhost koha-RC1]#

I suppose you have proper filters in place so that people can't just
connect to your mysql port. So, the following should be safe to do.

1. Stop the MySQL system with /etc/rc.d/init.d/mysql stop

   If this does not work (e.g., ps ax|grep mysqld still show mysqld
   after a while), do a "killall mysqld safe_mysqld" (and "hope" the
   tables are ok)

2. Restart MySQL with no security. You'll need to know where your
   mysqld is. (You can read the /etc/rc.d/init.d/mysql to find out,
   or use the "rpm -ql mysql" command, I think.) Suppose it is in
   /usr/sbin/mysqld. Then do a

   /usr/sbin/mysqld --skip-grant-tables

3. Run mysql and give root a password, by doing a

   insert into mysql.users values ('localhost', 'root',
      password('REAL-ROOT-PASSWORD'), 'Y', 'Y', 'Y', 'Y', 'Y',
      'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');

   If MySQL complains that the number of columns is not right, do
   a "describe mysql.users;" and adjust the number of 'Y''s

4. Restart the MySQL system (with security).

There might be a shorter fix, but this should work.


-- 
Ambrose LI Cheuk-Wing  <a.c.li at ieee.org>




More information about the Koha-devel mailing list