Locked out of mysql


(paul_marwick) #1

Sorry, looks as though my email reply got a bit chopped off. I’m not yet very comfortable with this interface.

I’ll have to try again with another backup, but the problem seemed to be that the script was locked out of mysql. I’ve stripped parts of the log to make it a little easier to follow:

Action: /etc/e-smith/events/nethserver-mysql-update/S00initialize-default-databases SUCCESS [0.240041]`

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)

That error repeats over and over again until I kill the process. It looks as though the script is locked out of mysql sue to the lack of a password, but I don’t understand why it went through once, but has now failed twice on fresh installs. I’ll try again next week with a fresh backup, just in case there was something out of place in the backup I used on this attempt, but any hints as to what the problem might be would be useful.

Paul


How many of you have switched/migrated from SME Server?
(Giacomo Sanchietti) #2

The reported line is not relevant to mysql problem.

Just check the mysql password saved under @/etc/my.pwd@, it should match the one saved under /root/.my.cnf


(paul_marwick) #3

The two passwords are completely different. /etc/my.pwd is around 70 characters, /root/.my.cnf is 18 characters long, and doesn’t even match the start of /etc/my.cnf

I’ve just logged into the donor system ( :slight_smile: what would I do without SSH…). /root/.my.cnf on the original system is the same as /etc/my.pwd on the migration candidate

I’ve also had a look in /var/lib/migration/root on the machine I’m trying to migrate. It matches /etc/my.pwd and the original system.

:slight_smile: I’m confused…