OpenVZ mysql root password fail

If the device files in /dev get messed up in an OpenVZ VPS (often by udev) then when you try to run mysql with the -p flag it will still not ask you for a password, like this –

# mysql -u root -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

To correct this try running the following commands –

# MAKEDEV /dev/tty
# MAKEDEV /dev/pty
# MAKEDEV /dev/null

# mysql -p
Enter password:

1 thought on “OpenVZ mysql root password fail

Comments are closed.