Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Webmin not able to manage mysql
View previous topic :: View next topic  
Author Message
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Sep 24, 2012 4:33 am    Post subject: Webmin not able to manage mysql Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon Sep 24, 2012 5:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Sep 24, 2012 4:47 pm    Post subject: Reply with quote

haven't changed anything , I checked the config and looked ok. Will compare with new.
Back to top
View user's profile Send private message
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Sep 24, 2012 4:56 pm    Post subject: Reply with quote

/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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon Sep 24, 2012 5:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Sep 24, 2012 5:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon Sep 24, 2012 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Sep 24, 2012 6:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon Sep 24, 2012 6:28 pm    Post subject: Reply with quote

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
Code:
mysql -uroot
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
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Sep 24, 2012 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Tue Sep 25, 2012 12:01 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Tue Sep 25, 2012 2:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Tue Sep 25, 2012 3:13 am    Post subject: Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Tue Sep 25, 2012 7:38 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Tue Sep 25, 2012 6:56 pm    Post subject: Reply with quote

I appreciate it. I am thinking it was in the update to 5.1 to 5.5 mysql.
Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional