LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mysql problem: after changing root password, cannot start onboot (https://www.linuxquestions.org/questions/linux-general-1/mysql-problem-after-changing-root-password-cannot-start-onboot-585418/)

Swakoo 09-17-2007 08:15 PM

Mysql problem: after changing root password, cannot start onboot
 
I have a master-master setup (using heartbeat) and recently, the 1st master password has been lost.. so I change it by stopping the service, and restarting it using --skip-grant-tables. thereafter i change it but when i try to restart the service I get a "MySQL manager or server PID file could not be found" error.

I tried removing my entire my.cnf and the service work. I figure it is something to do with the replication (corrupted?) but i have no idea how I should go about restoring/troubleshooting.. anyone can guide?

Right now, I manually start mysql by executing mysqld -uroot --relay-log=db1-relay-bin

Replication is still working, just that it cannot start on boot...



thanks!@

Swakoo 09-17-2007 09:54 PM

this is what is in the db1.hostname.err in /var/lib/mysql

Quote:

070918 10:06:11 InnoDB: Started; log sequence number 0 43655
^G/usr/sbin/mysqld: File '/var/log/mysql/mysql-bin.000036' not found (Errcode: 13)
070918 10:06:11 [ERROR] Failed to open log (file '/var/log/mysql/mysql-bin.000036', errno 13)
070918 10:06:11 [ERROR] Could not open log file
070918 10:06:11 [ERROR] Can't init tc log
070918 10:06:11 [ERROR] Aborting

Swakoo 09-17-2007 10:02 PM

Ok I realise when I start mysql as "root" it works, but as "mysql" it doesn't

the following are the onscreen output as follows:

as 'root'
Quote:

[root@db1 mysql]# 070918 10:21:10 InnoDB: Started; log sequence number 0 43655
070918 10:21:10 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
070918 10:21:10 [Note] Starting crash recovery...
070918 10:21:10 [Note] Crash recovery finished.
070918 10:21:10 [Warning] 'user' entry 'root@db1.hostname.com' ignored in --skip-name-resolve mode.
070918 10:21:10 [Note] mysqld: ready for connections.
Version: '5.0.37-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)
070918 10:21:10 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000017' at position 10949, relay log './db1-relay-bin.003698' position: 235
070918 10:21:10 [Note] Slave I/O thread: connected to master 'slave2@192.168.69.2:3306', replication started in log 'mysql-bin.000017' at position 10949

As 'mysql'
Quote:

[1] 7476
[root@db1 mysql]# 070918 10:21:01 InnoDB: Started; log sequence number 0 43655
mysqld: File '/var/log/mysql/mysql-bin.000038' not found (Errcode: 13)
070918 10:21:01 [ERROR] Failed to open log (file '/var/log/mysql/mysql-bin.000038', errno 13)
070918 10:21:01 [ERROR] Could not open log file
070918 10:21:01 [ERROR] Can't init tc log
070918 10:21:01 [ERROR] Aborting

070918 10:21:01 InnoDB: Starting shutdown...

[root@db1 mysql]# 070918 10:21:04 InnoDB: Shutdown completed; log sequence number 0 43655
070918 10:21:04 [Note] mysqld: Shutdown complete


[1]+ Exit 1 mysqld --user=mysql --relay-log=db1-relay-bin

Seems like they are pointing to different log files... no?

thanks again!

Swakoo 09-18-2007 04:37 AM

ok i found out mine problem

somehow, the permissioning of the log files were switched to root, thereby create errcode 13, which is permission denied. i just chown the files back to mysql, and it work.

whew.

thanks for reading people!


All times are GMT -5. The time now is 08:40 PM.