Koozali.org: home of the SME Server

phpMyAdmin installed but I cannot access Privileges

pearless

phpMyAdmin installed but I cannot access Privileges
« on: June 13, 2007, 01:02:20 AM »
Hi,

I have installed the myPHPAdmin contrib and I went to go to the Privileges page to change the admin password from the default and I got:

Code: [Select]
User overview
Warning: Your privilege table structure seems to be older than this MySQL version!
Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!

Open new phpMyAdmin window


So I used putty as root and tried:

Code: [Select]

[root@main bin]# ./mysql_fix_privilege_tables --verbose
This script updates all the mysql privilege tables to be usable by
MySQL 4.0 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION, or the more secure passwords in 4.1

You can safely ignore all 'Duplicate column' and 'Unknown column' errors
because these just mean that your tables are already up to date.
This script is safe to run even if your tables are already up to date!

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Got a failure from command:
/usr/bin/mysql --no-defaults --force --user=root --host=localhost --database=mysql
Please check the above output and try again.

If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option
[root@main bin]#



Hmm, checked the forums and couldn't find this problem, not sure what to do now, help!
Cheers Douglas.

matsk

phpMyAdmin installed but I cannot access Privileges
« Reply #1 on: June 13, 2007, 06:53:37 AM »
Did you try the suggestion in the message from mysql_fix_provilege_tables script?
Code: [Select]

If you get an 'Access denied' error, you should run this script again and
give the MySQL root user password as an argument with the --password= option


Code: [Select]
[root@main bin]# ./mysql_fix_privilege_tables --verbose --password=yourpassword

pearless

phpMyAdmin installed but I cannot access Privileges
« Reply #2 on: June 13, 2007, 06:57:40 AM »
I am not sure what the MYSQL root user password is, I recall it was a long (70+ character) randomly generated string but I have no idea what it was!

matsk

phpMyAdmin installed but I cannot access Privileges
« Reply #3 on: June 13, 2007, 07:27:11 AM »
If my memory serves me right you should be able to use the password string in the file /root/.my.cnf so just copy that string and paste it in as your password.

pearless

phpMyAdmin installed but I cannot access Privileges
« Reply #4 on: June 13, 2007, 08:09:00 AM »
Yes, that worked, and rather than change the admin password, I accidentally deleted the admin account. DANG, how can I recreate that??

matsk

phpMyAdmin installed but I cannot access Privileges
« Reply #5 on: June 13, 2007, 08:31:55 AM »
restore from your backup or do a google.

pearless

phpMyAdmin installed but I cannot access Privileges
« Reply #6 on: June 13, 2007, 08:39:03 AM »
Using google, I have managed to get access with another another userid by editing
Code: [Select]
/etc/httpd/conf/httpd.conf
and looking for line:
Code: [Select]
<Directory /opt/administration/phpmyadminmulti/scripts>
and a few lines down, commenting out this line
Code: [Select]
#    require user admin
but this userid doesn't have admin privileges, dang.

I do not want to restore as I assume that will lose all the emails and changes on my hard drives (also the dang backup is running so the previous one is 2 days older).

I would greatly appreciate any ideas as I cannot access the /server-manager panel either as it obviously uses the admin account!

Cheers Douglas.

pearless

phpMyAdmin installed but I cannot access Privileges
« Reply #7 on: June 13, 2007, 08:58:15 AM »
I managed to putty to my server and went passwd admin and entered the new password.
I can logon via admin onto /server-manager but then I get a blank screen.
it stays on page:
Code: [Select]
https://172.22.0.60/server-common/cgi-bin/login
hmm progress??? ideas???

pearless

phpMyAdmin installed but I cannot access Privileges
« Reply #8 on: June 13, 2007, 09:02:31 AM »
I had to shutdown firefox and then try to logon again, I guess something stuck in the cache!
Now to try and get back onto phpMyAdmin....

pearless

phpMyAdmin installed but I cannot access Privileges
« Reply #9 on: June 13, 2007, 10:43:48 AM »
And then I did a
Code: [Select]

yum remove smeserver-phpmyadmin-multiuser-2.10.1-1
signal-event post-upgrade; signal-event reboot

and then reinstalled using
Code: [Select]
yum localinstall smeserver-phpmyadmin-multiuser-2.10.1-1.noarch.rpm[/code]

And it now works!!!

So I hope others learn from my mistake!

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
phpMyAdmin installed but I cannot access Privileges
« Reply #10 on: June 13, 2007, 10:55:30 AM »
Quote
So I hope others learn from my mistake!

What mistake? Never to delete the admin account?  :)  Check!

Umm put [solved] in your subject so that people know that you've solved it.
"It should just work" if it doesn't report it. Thanks!

pearless

What to do if you delete the admin account via phpMyAdmin
« Reply #11 on: June 13, 2007, 11:05:05 AM »
Here is a summary of what you need to do if you accidentally delete the admin account :evil: using phpMyAdmin.

(1) you need to logon to your server, either via the console or via a remote access tool like putty as the root account.
(2) enter
Code: [Select]
passwd admin and when prompted enter in your new password and then you will be prompted to re-enter it again to verify it.  At this point you will again be able to access the server-manager panel in SME, now to fix phpMyAdmin...
(3) uninstall phpMyAdmin by then going:
Code: [Select]

yum remove smeserver-phpmyadmin-multiuser-2.10.1-1

(Noting you need to change the version to the one you have installed)
Then you need to
Code: [Select]
signal-event post-upgrade; signal-event reboot
to fully remove the rpm, noting that your server will sit there for a while and then reboot.
Log back on as root and reinstall by going:
Code: [Select]

yum localinstall smeserver-phpmyadmin-multiuser-2.10.1-1.noarch.rpm

And now you will be back where you were BEFORE you deleted your admin account!  :D