View previous topic :: View next topic |
Author |
Message |
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Mon Sep 24, 2012 4:33 am Post subject: Webmin not able to manage mysql |
|
|
Keep getting this error;
DBI connect failed : Access denied for user ''@'localhost' to database 'mysql'
Root admin password remains blank for mysql.
I am able to successfully log into Mysql with phpmyadmin using root and no password.
have all the latest updates installed, Webmin 1.600
MySQL version 5.5.27 |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Sep 24, 2012 5:57 am Post subject: |
|
|
I can't reproduce it either in SMS or SMS64, but since you are able to login with phpmyadmin, it must be /etc/webmin/mysql/config (mysql module config).
Have you changed anything?
You can check differences with /etc/webmin/mysql/config.new
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Mon Sep 24, 2012 4:47 pm Post subject: |
|
|
haven't changed anything , I checked the config and looked ok. Will compare with new. |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Mon Sep 24, 2012 4:56 pm Post subject: |
|
|
/etc/webmin/mysql# diff config config.new
8d7
< encoding=
18,20d16
< charset=
< port=
< mysqld=
These are the only diffreneces.
issue may be in /etc/mysqlaccess.conf |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Sep 24, 2012 5:37 pm Post subject: |
|
|
I was trying to reproduce it, and all the times I was locked out from mysql, but since you can login through console or phpmyadmin your mysql setup has no issues.
Since webmin is using DBI perl module, I suspect that if you upgraded perl and perl modules from 5.14.2 that might be an issue, or if you haven't upgrade perl-modules-5.16.0 at all.
You can try removing perl and perl-modules and install them back, or reinstall perl-modules package only.
Have you tried to install webmin-1.590 to see if it's an webmin version issue, or that happened while you made a full upgrade?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Mon Sep 24, 2012 5:56 pm Post subject: |
|
|
I was having the issue with Webmin 1/590 also. Thought maybe 1.60 update would resolve, but same issue
I'm at latest on perl--
perl --version
This is perl 5, version 16, subversion 1 (v5.16.1) built for i486-linux-thread-multi
I will try to uninstall and reinstall perl.
Actually signing into phpmyadmin as root and no password does not allow me to create new databases, although I can access previously created DB's.
root seems to have no privileges on mysql, only ably to sign in with phpmyadmin
MySQL said:
#1227 - Access denied; you need (at least one of) the PROCESS privilege(s) for this operat
Last edited by Busta on Mon Sep 24, 2012 6:06 pm; edited 1 time in total |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Sep 24, 2012 6:05 pm Post subject: |
|
|
Have you try to create a database through console?
Code: | mysql> create database sssss; |
or Code: | mysqladmin create sssss |
Also did you run "mysql_upgrade"?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Mon Sep 24, 2012 6:11 pm Post subject: |
|
|
Looks like perm issue. I could delete mysql and re-install. LDAP involved here at all?
Commands:
mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysql/mysql.sock'
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysql/mysql.sock'
Running 'mysql_fix_privilege_tables'...
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
FATAL ERROR: Upgrade failed
mysqladmin create sssss
mysqladmin: CREATE DATABASE failed; error: 'Access denied for user ''@'localhost' to database 'sssss'' |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Sep 24, 2012 6:28 pm Post subject: |
|
|
OK so it's a mysql error...
Stop mysql either with rc.mysql or kill -9.
run
Code: | mysqld_safe --skip-grant-tables |
login to mysql with
and do
Code: | mysql> use mysql;
mysql> update user set Password=PASSWORD('') where user='root';
mysql> flush privileges;
mysql> exit; |
kill mysql and start it with rc.mysql
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Mon Sep 24, 2012 7:30 pm Post subject: |
|
|
mysql> use mysql;
Database changed
mysql> update user set Password=PASSWORD('') where user='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye
/etc/rc.d/rc.mysqld start
120924 12:31:23 mysqld_safe Logging to '/var/lib/mysql/sms165.err'.
120924 12:31:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
same issue;
DBI connect failed : Access denied for user ''@'localhost' to database 'mysql'
After unistal/re-install of Mysql using slapt-get >>>- issue continues |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Sep 25, 2012 12:01 am Post subject: |
|
|
1. check permissions of /var/lib/mysql
doing a Code: | chown -R mysql:mysql /var/lib/mysql |
doesn't hurt.
2. kill mysql again start with
Code: | mysqld_safe --skip-grant-tables |
and try to do a mysql_upgrade
3. While you are in with "skip-grant-tables" login to mysql and do
Code: | mysql> SELECT * FROM mysql.user WHERE User='root'\G
| and post the output.
4. if you haven't add any users or databases you can restore mysql database from mysql-data package.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Tue Sep 25, 2012 2:32 am Post subject: |
|
|
performed suggested steps, but back at the same @localhost issue-
mysql> SELECT * FROM mysql.user WHERE User='root'\G
ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'
mysql>
edit- did not specify database so issued use mysql;
then ran the SELECT statement above, and it completed without error.
killed mysqld
reinstalled mysql-data, and restarted mysqld using /etc/rc.d/rc.mysqld start"
still having same issue. There is an issue here with the tables and how webmin (i guess) is reading those tables. I have also reinstalled the webmin mysql module. |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Tue Sep 25, 2012 3:13 am Post subject: |
|
|
ok - got it to work-
Removed and Reinstalled mysql and mysql-data from repo
I started mysqld --skip-grant-tables
Went to Webmin and noticed root user was no granted any database permissions
granted root any and all database (not user) permissions through webmin
stopped mysql and restarted using "rc.mysql start"
Now able to manage through webmin. Don't know why the root user was removed from mysql DB perm.
Thanks for your help. Made another donation to you, keep up the great work! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Sep 25, 2012 7:38 am Post subject: |
|
|
There was a similar issue in the past with another user, changing database permissions through webmin, and had weird behaviors after...
So my guess is that either the problem occurred after messing with webmin's database permissions tab or from an upgrade from mysql-5.1.x to mysql-5.5.x.
The command Code: | mysql> SELECT * FROM mysql.user WHERE User='root'\G |
should output user root and his database permissions.
Thank you for the donation...
I send you a link for SMS AIO DVD.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Busta -{ D.O.N.A.T.O.R. }-
Joined: 13 Aug 2007 Posts: 81
|
Posted: Tue Sep 25, 2012 6:56 pm Post subject: |
|
|
I appreciate it. I am thinking it was in the update to 5.1 to 5.5 mysql.
 |
|
Back to top |
|
|