Koozali.org: home of the SME Server

I killed my MYSQL database

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« on: September 26, 2006, 10:33:03 AM »
Hi

I feel really stupid.  I was having a play with phpBB2 and a few other bits and pieces and totally killed the databases on my server.

Can anyone help me recover from "MY ERROR" ( playing with something I don't understand ) ?

I can't login to phpmyadmin is the first problem and then there is mambo website that i have installed.

Regards
Adrian
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #1 on: September 26, 2006, 11:51:09 AM »
Did you change the MySQL root users password ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #2 on: September 26, 2006, 11:53:35 AM »
I don't think so ... but i can't login using it ... so i'm going to assume the it has been changed

Adrian
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #3 on: September 26, 2006, 12:01:26 PM »
At the command prompt what does typing mysql give you ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #4 on: September 26, 2006, 12:03:19 PM »
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #5 on: September 26, 2006, 12:08:48 PM »
Guess you get the same with
Code: [Select]
mysql -uroot?
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #6 on: September 26, 2006, 12:19:48 PM »
It is looking like you messed with the root users password in MySQL.

Code: [Select]
cd /service/mysqld
runsvctrl d .
cat set.password | /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables
runsvctrl u .


The above method may fix it for you.

Code: [Select]
cd /service/mysqld
runsvctrl d .
/etc/e-smith/events/actions/mysql-delete-db-files
signal-event post-upgrade
signal-event reboot


The above method may fix it for you but will erase data in your databases.

Both methods are from here.

I have never tried them myself.
Regards,
William

IF I give advise.. It's only if it was me....

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #7 on: September 29, 2006, 07:02:54 AM »
william_syd

I appreciate your help.  But unfortunately, is still can't login via phpmyadmin.

I'm thinking that the password has been changed and I have no idea how to change that.  Could you or someone else tell me how I can get thing back to normal?  I fear that I may have to resintall from scratch if i can't fix this.

Thanks in advance
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #8 on: September 29, 2006, 07:05:05 AM »
Quote from: "teviot"
But unfortunately, is still can't login via phpmyadmin.



But you can by just typing mysql at the prompt.

If so, don't panic.
Regards,
William

IF I give advise.. It's only if it was me....

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #9 on: September 29, 2006, 07:09:01 AM »
yes I can
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #10 on: September 29, 2006, 07:12:28 AM »
Quote from: "teviot"
yes I can


Follow these steps and let me know how you went.

Disregard the last line.
Regards,
William

IF I give advise.. It's only if it was me....

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #11 on: September 29, 2006, 07:21:59 AM »
All went well until i tried to login

I got
Quote
Error
#1045 - Access denied for user 'monty'@'localhost' (using password: YES)
as a response
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #12 on: September 29, 2006, 07:33:23 AM »
Quote from: "teviot"
All went well until i tried to login

I got
Quote
Error
#1045 - Access denied for user 'monty'@'localhost' (using password: YES)
as a response


Please list how the individual steps went.
Regards,
William

IF I give advise.. It's only if it was me....

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #13 on: September 29, 2006, 10:26:21 AM »
Quote
[root@gateway phpmyadminmulti]# mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 159 to server version: 4.1.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' IDENTIFIED BY 'some_password' WITH GRANT OPTION;
Query OK, 0 rows affected (0.03 sec)

mysql> quit
Bye
[root@gateway phpmyadminmulti]#


I then did
Quote
pico config.inc.php
and edited the file to reflect the changes and then tried to access phpmyadmin

I didn't get any errors but it appeared to just reload the login page

I also noticed that you have version 2.9.0 running.  I would like to upgrade to that when this problem is sorted
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #14 on: September 29, 2006, 10:51:59 AM »
I'm not sure why it's not working.

Do you still have the rpm ?

Uninstall it the way you installed it.

rpm -e name_of_rpm

or

yum remove name_of_rpm

then reinstall with

yum localinstall name_of_rpm

then login with admin/admin
Regards,
William

IF I give advise.. It's only if it was me....