Deleted mysql root user!!!

Discussion in 'Installation/Configuration' started by Peter Richardson, Aug 2, 2018.

  1. Peter Richardson

    Peter Richardson New Member

    Hi all,
    I'm trying to set up isp config clustered on debian 9 with this tutorial:
    https://www.howtoforge.com/tutorial...ase-cluster-on-debian-8.4-with-ispconfig-3/3/

    but I accidentally deleted the root user for mysql / mariaDB. I googled a solution and managed to reinstate the root user but now it won't let me grant permissions for new users. When I type this command:
    Code:
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.20.60.19' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
    I get this error:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Any clues? Will I have to reinstall MariaDB? Will that ruin all progress through the tutorial? Will I need to start from scratch? Can I fix this without reinstalling? It has taken me 3 days to get this far, I don't want to spoil my progress! :-(
     
  2. ahrasis

    ahrasis Well-Known Member

    I am not so sure but I am thinking of backup all database, purge mariadb / mysql, reinstall them and restore my database backup. There could be other easier way though.
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The ISPConfig manual might be better suited. Use it for the multiserver things, and read the Perferct Server Guide for Debian 9 installation parts.
    As for the created root user, [email protected] and [email protected] must both be given privileges, if you indeed do use both. Have you created [email protected] user and given that user permissions?
     
    ahrasis likes this.
  4. Peter Richardson

    Peter Richardson New Member

    Thanks Talemam. I think I have, how can I check to make sure I've created that user and that they have the appropriate privileges?
     
  5. ahrasis

    ahrasis Well-Known Member

    You can login via mysql -uroot -p and check or via phpmyadmin using root account and check.
     
  6. Peter Richardson

    Peter Richardson New Member

    Thanks ahrasis! Can you please give me more commands, exactly? I'm not yet a Linux expert :)
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Would it be easier to start from the beginning the installation? This time using the ISPConfig manual and Perfect Server Guide. Now that you have practised installing, it should be easier.
     

Share This Page