General discussion

  • Creator
  • #2177179

    MySQL/Webmin access problem


    by nevernessit ·

    MySQL new db error (permission denied)
    Hello all, and thanks in advance for your help.

    I am fairly new to linux, but I have been thrust into a network admin role where I now manage a FreeBSD webserver.

    I use Webmin to manage most of the things on this machine and I am having a problem with MySQL.

    There is a mysql user setup on the system and I used that user to loging the mysql module on Webmin. I can log in fine (although even though there is a password setup for the user mysql on the system, to get into the Webmin MySQL module it will only allow me to login in if I leave the password field blank)

    Anyway, when I try to create a new database, look at the exsisting ‘test’ db permissions, table permission or field permissions etc I get the following error message:

    “Failed to create database : DBI connect failed : Access denied for user: ‘@localhost’ to database ‘mysql'”

    What is going wrong?? The ‘@localhost’ part looks like Webmin is not using a user to login to the MySQL program even though I login to the Webmin MySQL module with the mysql user (minus password as stated above)

    Please help, I have looked everywhere for an answer to this issue. Thanks.

    PS. And remeber I am new to linux and freebsd commands etc. Thanks again!

All Comments

  • Author
    • #3331827

      Reply To: MySQL/Webmin access problem

      by jaqui ·

      In reply to MySQL/Webmin access problem

      log in as the system admin.
      only login needed for any admin task.

      logging in as user mysql actually limits your access to mysql.
      this is to stop people from running sql queries that can breach security of the system.

      • #3331356

        Reply To: MySQL/Webmin access problem

        by nevernessit ·

        In reply to Reply To: MySQL/Webmin access problem

        If I try to login as root it tells me that the administrator password is incorrect (the pass I enter is correct as it is the same root pass that I use to login to Webmin in the first place.) It must want the mysql password.

    • #3352506

      Reply To: MySQL/Webmin access problem

      by delimiter2 ·

      In reply to MySQL/Webmin access problem

      If you look in this file:
      there are a couple of values which may need to be tweeked.

      If you set login=foo and pass=bar, you would need to issue the following commands to mysql in order to get access with those credentials.
      mysql mysql
      grant all on *.* to foo@localhost identified by ‘bar’
      flush privileges

      Then try your webmin access again.

    • #3335737

      Reply To: MySQL/Webmin access problem

      by nevernessit ·

      In reply to MySQL/Webmin access problem

      This question was closed by the author

Viewing 2 reply threads