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....

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
I killed my MYSQL database
« Reply #15 on: September 29, 2006, 11:25:30 AM »
Quote from: "teviot"

I also noticed that you have version 2.9.0 running.  I would like to upgrade to that when this problem is sorted


My SME runs the old one.
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #16 on: September 29, 2006, 11:27:23 AM »
I uninstalled it then reinstalled

I'm still unable to login.

Quote
[root@gateway phpmyadmin]# rpm -e smeserver-phpmyadmin-multiuser
Sending USR1 signal to httpd-e-smith [  OK  ]
[root@gateway phpmyadmin]# rpm -Uvh smeserver-phpmyadmin-multiuser-2.1-1.noarch.rpm
Preparing...                ########################################### [100%]
   1:smeserver-phpmyadmin-mu########################################### [100%]
Sending USR1 signal to httpd-e-smith [  OK  ]

Vous pouvez maintenant acceder à phpmyadmin via un browser web de la maniere suivante https://nom_server/myadmin
Vous pourrez vous loger sous admin avec comme mot de pass admin. N'oublier pas de le changer!
Si vous mettez à jour une version 2.1 ou supérieur, le mot de passe admin n'aura pas changer!

Now you can access phpmyadmin though your browser at  https://server_name/myadmin
You can connect using login admin and password admin. Don't forget to change it
If you update a 2.1 version of this contribs, admin password don't change!
[root@gateway phpmyadmin]#
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 #17 on: September 29, 2006, 11:41:02 AM »
I don't understand it.

We're missing some small detail.

I just reinstalled mine on a new sme.

Username: admin
Password: admin

Ok, uninstall again and get rid of the admin user

Code: [Select]
mysql> DELETE FROM mysql.user
    -> WHERE User='admin' and Host='localhost';
mysql> FLUSH PRIVILEGES;


then reinstall.
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #18 on: September 29, 2006, 11:44:57 AM »
Thanks

That did the trick

Quote
[root@gateway phpmyadmin]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 173 to server version: 4.1.20

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

mysql> DELETE FROM mysql.user
    -> WHERE User='admin' and Host='localhost';
Query OK, 0 rows affected (0.01 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye
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 Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #19 on: September 29, 2006, 11:45:52 AM »
Should I now re-install mambo?
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 #20 on: September 29, 2006, 11:47:13 AM »
Good.

You ok with mambo.


opps... you were quick.

Whats the error for Mambo?
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 #21 on: September 29, 2006, 11:54:30 AM »
If your going to reinstall, unless you have a reason for using Mambo I would install Joomla.
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #22 on: September 29, 2006, 11:57:33 AM »
i think so ... will just uninstall and then reinstall
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 #23 on: September 29, 2006, 11:58:38 AM »
Quote from: "teviot"
i think so ... will just uninstall and then reinstall


Hang on..it might be an easy fix.
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #24 on: September 29, 2006, 12:00:22 PM »
have a look at http://www.teviot.net/ to see my problem there
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 Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #25 on: September 29, 2006, 12:06:42 PM »
i'm thinking that maybe recreate the database for mambo ... because the web site stuff is still in the directory

what do you think
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 #26 on: September 29, 2006, 12:13:09 PM »
Look in your mambo directory for configuration.php

Look in it for $mosconfig_db, $mosconfig_user and $mosconfig_password


Is the user 'root' or 'admin' ?


Your page failed to load.

Code: [Select]
ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://www.teviot.net/

The following error was encountered:

    * Connection Failed

The system returned:

    (110) Connection timed out

The remote host or network may be down. Please try the request again.

Your cache administrator is webmaster.
Generated Fri, 29 Sep 2006 10:10:51 GMT by smoothwall (squid/2.5.STABLE12)
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #27 on: September 29, 2006, 12:14:14 PM »
i have noticed something with phpmyadmin.  It has the following message on the bottom of the screen

Quote
You have enabled mbstring.func_overload in your PHP configuration. This option is incompatible with phpMyAdmin and might cause some data to be corrupted!


Is this something i need to worry about?

[/quote]
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 #28 on: September 29, 2006, 12:21:42 PM »
Quote from: "teviot"
i have noticed something with phpmyadmin.  It has the following message on the bottom of the screen

Quote
You have enabled mbstring.func_overload in your PHP configuration. This option is incompatible with phpMyAdmin and might cause some data to be corrupted!


Is this something i need to worry about?

[/quote]

If the phpMyAdmin developers put the warning in there then it must be something to be concerned about.

I can't find that warning appearing on mine . http://secure.magicwilly.info:8182/myadmin/

Did you change something in your php.ini ?
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #29 on: September 29, 2006, 12:30:27 PM »
Quote
$mosConfig_user = 'www';
$mosConfig_password = 'some-password';
$mosConfig_db = 'Mambo';
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 #30 on: September 29, 2006, 12:33:14 PM »
Quote from: "teviot"
Quote
$mosConfig_user = 'www';
$mosConfig_password = 'some-password';
$mosConfig_db = 'Mambo';


If you use phpMyAdmin do you see a user 'www' ?
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #31 on: September 29, 2006, 12:42:08 PM »
I didn't ... but i added it ... thinking you would say that ...

Please check www.teviot.net to see the error i now get.


If i could have a guess ... recreate the database using the install instructions?
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 #32 on: September 29, 2006, 12:50:34 PM »
Quote from: "teviot"
I didn't ... but i added it ... thinking you would say that ...

Please check www.teviot.net to see the error i now get


Does the mos_session table exist in the Mambo db ?

Did you give your user access to the Mambo db?
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #33 on: September 29, 2006, 12:58:05 PM »
nothing is in the database ... i'll take a punt and try reinstalling the database ... if i can't do that, I'll reinstall mambo with the rpm i have.   There was nothing on the web site i really need or can't recreate
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 #34 on: September 29, 2006, 01:01:13 PM »
Hey it's working. Did you reinstall? You have todo something with the installation directory.
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 #35 on: September 29, 2006, 01:04:31 PM »
Quote from: "teviot"
nothing is in the database ... i'll take a punt and try reinstalling the database ... if i can't do that, I'll reinstall mambo with the rpm i have.   There was nothing on the web site i really need or can't recreate


Nothing in the db, that will do it eveytime. :)

You might want to get rid of that warning in PhpMyAdmin.
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #36 on: September 29, 2006, 01:04:46 PM »
going to reinstall ... unless you think that Joomla is easier to use and configure

Where do i get Joomla from???
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 Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #37 on: September 29, 2006, 01:06:20 PM »
Quote
You might want to get rid of that warning in PhpMyAdmin.


Can you talk me though this please
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 #38 on: September 29, 2006, 01:14:17 PM »
Quote from: "teviot"
Quote
You might want to get rid of that warning in PhpMyAdmin.


Can you talk me though this please


I don't have that problem here.

It's probably in your httpd.conf or php.ini

Code: [Select]
/etc/httpd/conf/httpd.conf
/etc/php.ini


Search through both for
Code: [Select]
mbstring.func_overload

What did you do to your site.. I now get a directory listing?
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #39 on: September 29, 2006, 01:37:18 PM »
Quote
going to reinstall ... unless you think that Joomla is easier to use and configure

Where do i get Joomla from???
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 #40 on: September 29, 2006, 01:51:54 PM »
Quote from: "teviot"
Quote
going to reinstall ... unless you think that Joomla is easier to use and configure

Where do i get Joomla from???


Yeah.. Go Joomla.

dungog has made it easy.

Code: [Select]
SME 7.0
1. From the command line enter the following, (or copy and paste into your ssh client)

db yum_repositories set dungog repository \
 BaseURL http://sme.dungog.net/packages/smeserver/7.0/i386/dungog/ \
 EnableGroups yes \
 GPGCheck no \
 Name 'SME Server 7 - dungog' \
 Visible no \
 status disabled


Then...
Code: [Select]
/sbin/e-smith/expand-template /etc/yum.conf

Doh.. their site had gone down on me...

Anyway, it's dungog.net

their command will be something like
Code: [Select]
yum install joomla smeserver-joomla

you want to use
Code: [Select]
yum --enablerepo=dungog install joomla smeserver-joomla


Check their site for the exact file name.


EDIT: One minute later Joomla
Regards,
William

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

Offline Teviot

  • *
  • 610
  • +0/-0
I killed my MYSQL database
« Reply #41 on: September 29, 2006, 02:31:32 PM »
Joomla installed ... just rebooting the server

Thank you for all your help.  I just hope that if the same thing happens again ( Hope Not ), I can remember what to do

Thanks Again william_syd
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 #42 on: September 29, 2006, 02:36:41 PM »
Quote from: "teviot"
Joomla installed ... just rebooting the server

Thank you for all your help.  I just hope that if the same thing happens again ( Hope Not ), I can remember what to do

Thanks Again william_syd


Are you rebooting 'cause yum told you too?

Remember how to get your password for the Joomla install?

Quote from: "dungog.net"
During installation you will be asked for your mysql details
databasename 'joomla'
user 'joomla'
password 'config show joomla'

[root@kiwi bin]# config show joomla
joomla=service
DbPassword=N9RPYCxC5CX+1DuxChoiv96tb987adtb9afbt98a7fbeYakJ6Z8mxsCbXB78P
URL=cms

after installed, rm -rf /opt/joomla/installation

The installation questions are so easy, it's not possible to have a problem !!

Setup of joomla will take some time, change the default template and visit joomlahelp.org

to add a more memorable URL eg. YourServer.net/site
config setprop joomla URL site
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart
pico -w /opt/joomla/configuration.php and
edit $mosConfig_live_site from joomla to site


Did you find your phpmyadmin problem?
Regards,
William

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