Peter Meyer's picture

Hi,

I installed turnkey a few days ago. Nice touch to have webmin, apache, php all installed. It basically all works.

There is just one problem that I can't get solved by myself: mysql should be accessible from outside the virtual machine into which I installed turnkey linux.

What I want to do ist:

# mysql 192.168.0.80 -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost'

.. it doesn't matter if I set a password or not, whether I disable the firewall or not (I get a password request, so there is a conection, I am just not allowed in)

 

What I tried so far:

http://www.turnkeylinux.org/docs/database-remote-access

PHPMyAdmin tells me that there is a user root with host % (all) with all privileges (I tried with and without a password)

I tried setting the bind-address in my.cnf

I disabled the firewall in webmin

I reinstalled the whole turnkey-lamp-11.0-lucid-x86 from iso (the first time I used the vmware 2009.10-2  image)

... all to no avail - there is no remote access to mysql ...

 

could someone please tell me what I could try now? Or what configuration file I should add to provide more information?

Thanks

Forum: 
Peter Meyer's picture

Hi,

Replying to myself. This &%%çç!! cost me hours...

However it is no bug of turnkey itself it also comes with the ubuntu server installation, it seems already broken from the beginning.

To resolve I did what is described here:

http://www.dotkam.com/2007/04/10/mysql-reset-lost-root-password/ (even though it says "lost password" my password was correct, it just didn't allow me to log in)

However I am not sure if I did a apt-get --purge remove mysql-server before that

... anyway, now it works for me

Jeremy Davis's picture

Although there was a bug lodged about Webmin MySQL not saving settings properly.

But you should still be able to do it. Just you'll have to manually edit the config file. OTTOMH it should be something like /etc/mysql/my.cnf (or something like that...)

As for what settings you'll need to change, you should find plenty of info via google. Just keep in mind that TKL v11.x is based on Ubuntu 10.04/Lucid (although MySQL settings should be pretty much consistent between Linux distros AFAIK).

You should only need to change MySQL settings. Changing the firewall (IPtables) rules is only needed if you have enabled it (it's disabled by default).

Actually there are instructions in the docs. See here.

Jeremy Davis's picture

By default all appliances that include MySQL (or any other DB) allow only local connections (ie remote connection is disabled). This is a security measure. AFAIK the standalone appliances don't have this configuration (it is assumed that a standalone DB server is for the purpose of using remote connections...)

So have a read of the docs here.

Add new comment