Environment
Novell NetWare 6.5
MySQL 4.x
Situation
- The MySQL client from NetWare's System Console cannot log in to the MySQL database. Attempted to utilize KB 10093962 (How to change the MySQL root password) but this failed.
- There is a corrupt MySQL user's table in the MySQL database
preventing any updates, modifications, or connections.
Resolution
The MySQL database needs to be reset. This is done by doing
the following :
- Unload mysqld .
- Rename SYS:/mysql/data to SYS:/mysql/data.old - to prevent as much data loss as possible.
- Run :
mysql_install_db
- Start MySQL using :
mysqld_safe --skip-grant-tables --autoclose
- From the System Console, run mysql .
- At the MySQL prompt, type in :
UPDATE mysql.user SET Password=PASSWORD('********') WHERE User='root';
(ensuring that the ******** is set to the password desired for root). - Flush the privileges :
FLUSH PRIVILEGES;
- Unload mysqld again.
- Copy the database subfolders (EXCEPT for the SYS:/mysql/data/mysql folder) from the SYS:/mysql/data.old/ to the new SYS:/mysql/data/ directory.
- Restart MySQL :
mysqld_safe --basedir SYS:/mysql --autoclose
- Log in and browse to ensure the data tables exist. This
can be done using the phpMyAdmin tool or using the command from the
System Console :
mysql -u root -p
[enter the password]
use [database name];
SHOW TABLES;
- If problems persist, remove
each database folder (except the SYS:/mysql/data/mysql subfolder)
and restart MySQL until the root user can log in.