Problem MySQL/MariaDB during install

Discussion in 'Installation/Configuration' started by Wingull, May 30, 2024.

  1. Wingull

    Wingull New Member

    I have been having some trouble installing ISPconfig with the install.php script. I am not using the autoinstaller because I want to use a remote MySQL server. I created a user named ispconfig@localhost in the local MariaDB server, and gave it all permissions.
    After the expert mode steps involving the local MariaDB server I am met with the following error message:
    'Unable to grant databse permissions to user: '
    It seems to be unsuccessfully trying to run this query:

    Does anybody know how I could fix this problem? The remote MySQL server seemingly works properly because it successfully creates 'dbispconfig' every time I run the script. I'm using ISPconfig version 3 with the installer from ispconfig org/downloads/ISPConfig-3-stable.tar.gz
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This can't work, ISPConfig is creating its user by itself. never create a mysql user named ispconfig on a ISPConfig system. Create a MySQL root user and enter that user and password when ISPConfig installer asks for it.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw. using a remote database is not a good idea at all, your system will be quite slow. But if speed and reliability do not matter for this installation, you can do that of course.
  4. Wingull

    Wingull New Member

    Thank you for your fast reply. After deleting the user ispconfig in my MariaDB and granting all permissions to my root account, I am encountering the same problem. See enclosed screenshot of my installer. I also have added a screenshot of my MariaDB grants on the root account. Screenshot from 2024-05-30 11-49-33.png Screenshot from 2024-05-30 11-52-26.png
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The "with grant option" is missing for your mysql root user. Without that, root cannot create new users as ISPConfiug requires.
  6. Well-Known Member HowtoForge Supporter

    speaking of which.
    I know you are not using prepared statements, but it would be nice to have the lower privileged user on multi server
    setups to have this privilege as, well one may have some mods and might need it, maybe even ispconfig in some
    distant future.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    That's already the case. ISPConfig uses a lower privileged user in multi-server setups; the name is ispcsrv + server ID. The root user in multiserver setups is used to create that lower privileged user on the master node only. And using a lower-privileged user to create another lower-privileged user will not work; that's why the root user is required.
    ahrasis likes this.
  8. Well-Known Member HowtoForge Supporter

    Yes I know, but my point was, it can not use prepared statements as it is missing the privileges.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The user we create has the minimum permissions that it must have for security reasons, and privileges that we do not need will and shall not get activated for that user. If you have different needs for your systems, then you must adjust the user permissions to fit your needs by using a custom install script and calling ISPConfig installer within your script in auto-install mode.

    But your posts are not relevant for the issue of the user that started this thread, so you might want to make your own thread e.g. in dev forum, if you have such a question.
    ahrasis likes this.
  10. Wingull

    Wingull New Member

    Using the following command I attempted to grant my root user WITH GRANT OPTION
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' identified by 'password' WITH GRANT OPTION;
    I then flushed privileges, and my grant table looks like this.
    Screenshot from 2024-05-31 08-51-42.png
    After rerunning the ISPconfig install script I am met with the same installer error. I think my root user should now have the correct permissions. Thank you for helping!
  11. Well-Known Member HowtoForge Supporter

    If you want to setup ispconfig using a dedicated database server, which imho is a very good thing,
    you would need to have a root user on the remote sql server which is allowed to connect from your ispconfig ip(s)/hostname
    not just localhost.

    Also you need to check your firewall and allow the ispconfig server to use the port 3306 on your dedicated mariadb instance.

    Also make sure your dedicated database server is listening on the desired interface / ip e.G.,::
    just be aware, there have been bugs allowing unauthenticated users to gain root without knowing passwords in the past.
    Use a firewall
    Last edited: May 31, 2024
  12. Wingull

    Wingull New Member

    Thank you for the reply, but to clarify my problems are with my local MariaDB server. Everything is working perfectly on my dedicated MySQL server.
  13. Well-Known Member HowtoForge Supporter

    Ah dang, I thought I give it a try and read from the beginning.
    Though at post #4 you were asked the credentials to use for ispconfig.
    It asks you for the mysql root login + the user to create and use for ispconfig, where you entered 'root' which is generally a bad idea.

    I overlooked that before, sorry about that :/

Share This Page