• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Access denied for user 'root' @ ' localhost ' (Using password : NO ) #tried YES

Scheduled Pinned Locked Moved Solved
FOG Problems
5
24
15.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    ciranodd
    last edited by Mar 20, 2016, 5:34 AM

    First of all thanks before hand.
    Probably this is an old topic.

    This is a clean install. on Ubuntu 14.04 with FOG 1.2.0

    What i think i know !!!

    • root user does not have access to MYSQL
    • /var/www/fog/commons/config.php was moved to /var/www/fog/lib/fog/config.class.php
    • I need to check /opt/fog/service/etc/config.php #### I JUST CAN’T FIND IT ANYWHERE #####

    me@FogServer:/opt/fog$ ls
    snapins

    again thanks a lot !!!

    T 1 Reply Last reply Mar 20, 2016, 2:43 PM Reply Quote 0
    • T
      Tom Elliott @ciranodd
      last edited by Tom Elliott Mar 20, 2016, 8:43 AM Mar 20, 2016, 2:43 PM

      @ciranodd what’s in the file /var/log/installfog.log

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 1
      • C
        ciranodd
        last edited by Mar 21, 2016, 2:33 AM

        Hi Tom,

        All i have is /var/log/fog_error_6865.log but its empty !!!

        Thanks !!!

        1 Reply Last reply Reply Quote 0
        • T
          Tom Elliott
          last edited by Mar 21, 2016, 10:56 AM

          Then you’re not running FOG 1.2.0. You’re running “trunk” which is a totally different beast altogether.

          What’s in the installer’s bin/error_logs/fog_error_${versioninstalling}.log file?

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          C 1 Reply Last reply Mar 22, 2016, 4:29 AM Reply Quote 1
          • C
            ciranodd @Tom Elliott
            last edited by Mar 22, 2016, 4:29 AM

            @Tom-Elliott

            Oh Man what did i missed !!! is this Trunk the latest ??? (I will do my research on it)

            here it is what’s in the file !!!
            0_1458620896910_fog_error_6865.log

            Again Tom thanks so much for your help !!!

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by Sebastian Roth Mar 22, 2016, 3:18 AM Mar 22, 2016, 9:17 AM

              @ciranodd In the installer error log I only see one major issue. The package ‘php-gettext’ is not being installed because it’s called ‘php5-gettext’ in the installer. Looking at the debian, ubuntu and ondrej package lists I only find ‘php-gettext’. I am sure @Tom-Elliott will fix this soon. But you can install it yourself as well sudo apt-get install php-gettext

              Now about your original question. From what it looks like in the error log mysql-server was already installed on your system. That’s not an issue but I wonder if you set a MySQL root password some time ago (not linux system user root! That’s two totally different things!). Possibly you cannot remember it? The installer asks you for the MySQL password. Before running the installer you can test logging into your DB via mysql --host=127.0.0.1 --user=root -p. See if you know the correct password (most probably it’s not empty). If you have the correct MySQL root password edit /opt/fog/.fogsettings (snmysqlpass='...') and re-run the installer!

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              T C 2 Replies Last reply Mar 22, 2016, 10:45 AM Reply Quote 0
              • T
                Tom Elliott @Sebastian Roth
                last edited by Mar 22, 2016, 10:45 AM

                @Sebastian-Roth Edited to keep from trying to install the version.

                I have a hard time with ubuntu because almost ALL of the php packages are installed using php{MAJversion}-<packageToInstall> but just this ONE package is plain? WTF. I know not your fault, but i have made the corrections as suggested.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                C 1 Reply Last reply Mar 22, 2016, 5:54 PM Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Mar 22, 2016, 10:49 AM

                  @Tom-Elliott I don’t really know why they have php-gettext but this is true for debian as well…

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • C
                    ciranodd @Tom Elliott
                    last edited by Mar 22, 2016, 5:54 PM

                    @Tom-Elliott

                    Thanks Tom !!!

                    1 Reply Last reply Reply Quote 0
                    • C
                      ciranodd @Sebastian Roth
                      last edited by Mar 22, 2016, 6:07 PM

                      @Sebastian-Roth

                      Hi Sebastian,

                      Thanks for the help.

                      Indeed i assume my issue is MYSQL for the kind of error msg i’ve been getting.

                      • This was a clean install of Ubuntu 14.04. No MYSQL as far as i know unless in this version it is installed by default

                      • I was asked to type a MYSQL password for the root user while installing FOG. (Nothing)

                      • I saw in some post that entering a password for MYSQL root user may bring problems and
                        leave it blank. I am not a linux expert but any root user without password its a big no no !! but just for testing. (Nothing )

                      • i tried to edit this /opt/fog/.fogsettings (snmysqlpass=‘…’) but i dont see it anywhare i can get into /opt/fog/ but its empty.

                      #Not exactly sure if it makes any difference but i ran the installed as a SUDO user and not as ROOT which is what i’ve done in the past.

                      At the moment i am re-doing everything from zero on a different hard drive, but this time i will run the installer as root. Not sure if it makes any difference, but worth to try.

                      Very much appreciated for your time !!!

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by Sebastian Roth Mar 22, 2016, 2:44 PM Mar 22, 2016, 8:41 PM

                        @ciranodd

                        • installer can be run from a root shell (sudo su - / sudo -i) or as sudo ./installfog.sh - should both work fine!
                        • leaving the mysql root pw blank should work with FOG as well as setting a password - just needs to be the same
                        • /opt/fog/.fogsettings should be created when the installer runs all the way through - from the error log file you posted it looks like it should have created the .fogsettings file (try ls -al /opt/fog/ to see hidden files as well!)
                        • And you can take a look at the mysql connection settings in /var/www/html/fog/lib/fog/config.class.php - will be overwritten if you run the installer again!

                        Can you please post a screenshot of the “Access denied for user…” error?!

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        C 1 Reply Last reply Mar 23, 2016, 5:12 AM Reply Quote 0
                        • C
                          ciranodd @Sebastian Roth
                          last edited by Mar 23, 2016, 5:12 AM

                          @Sebastian-Roth
                          1_1458709828441_fogErrorRootAccess0.JPG 0_1458709828441_fogErrorRootAccess1.JPG

                          0_1458709862681_.fogsettings

                          please see attachment !!!

                          I think somehow i need to grant access to localhost to the root user .

                          1 Reply Last reply Reply Quote 0
                          • S
                            Sebastian Roth Moderator
                            last edited by Mar 23, 2016, 8:21 AM

                            @ciranodd Usually the MySQL root user has full access rights if you don’t actively restrict (I am sure you didn’t). As I can see in the .fogsettings file there is a password set. But from the screenshot we see that no password was used to connect to the DB. Have you re-run the installer after setting the password in .fogsettings? Please check /var/www/html/fog/lib/fog/config.class.php to see if the settings match! As well try to connect to your DB via the MySQL command line client to see if the DB is running and connection data is correct: mysql --user=root -p (try mysql command show databases; for example and exit to close)

                            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                            C 1 Reply Last reply Mar 23, 2016, 9:03 PM Reply Quote 1
                            • C
                              ciranodd @Sebastian Roth
                              last edited by Mar 23, 2016, 9:03 PM

                              @Sebastian-Roth

                              Again gents thanks !!!

                              I am down to GRANT root USER the right privileges I THINK !!!

                              Also i ran into a problem when running what you suggested mysql --user=root -p (Please see attachment fixed ) hopefully it helps someone else.

                              Just for convenience i install Webmin !!!

                              2_1458766852050_WebminMYSQL.JPG 1_1458766852050_rootMysqlPriviledges.JPG 0_1458766852050_ERROR 2002 (HY000)-FOG SERVER MYSQL FIX.txt

                              I still can’t grant the right privileges to root user for localhost. I tried even running mysql install again (keeping the same mysql root pass i’ve been using )but nothing.

                              T 1 Reply Last reply Mar 23, 2016, 9:10 PM Reply Quote 0
                              • T
                                Tom Elliott @ciranodd
                                last edited by Mar 23, 2016, 9:10 PM

                                @ciranodd At this point, you haven’t done, gained, or lost anythign.

                                Why not completely remove mysql/mariad and reinstall??

                                sudo apt-get --purge mysql*
                                rm -rf /var/lib/mysql
                                sudo apt-get install mysql mysql-server
                                

                                Of course if you have data to backup, backup first?

                                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                C 1 Reply Last reply Mar 23, 2016, 10:30 PM Reply Quote 0
                                • S
                                  Sebastian Roth Moderator
                                  last edited by Sebastian Roth Mar 23, 2016, 3:19 PM Mar 23, 2016, 9:17 PM

                                  @ciranodd You might be running into this old and know ubuntu mysql issue: https://github.com/fogproject/fogproject/issues/1

                                  I wonder why root@localhost only has “select table data” permission according to what we see in webmin… I am sure someone modified the DB. Probably Tom’s suggestion on removing the DB and starting from scratch is not bad I suppose.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  C 1 Reply Last reply Mar 23, 2016, 9:42 PM Reply Quote 1
                                  • C
                                    ciranodd @Sebastian Roth
                                    last edited by Mar 23, 2016, 9:42 PM

                                    @Sebastian-Roth

                                    I’ll try his suggestion !!

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      ciranodd @Tom Elliott
                                      last edited by Mar 23, 2016, 10:30 PM

                                      @Tom-Elliott

                                      !!! SUCCESS !!!

                                      Hi Tom,

                                      this is a fresh install, i have another Fog server fully functional. I am just trying to do another one from zero. NO need to backup anything.!!!

                                      i had a an error running sudo apt-get --purge mysql* so i tried

                                      apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5

                                      rm -rf /etc/mysql /var/lib/mysql

                                      apt-get autoremove

                                      apt-get autoclean

                                      then i ran

                                      #apt-get install mysql-server

                                      then check the Privileges and still root@localhost still has “select table data” only !!!

                                      i tried resetting MYSQL - Got an error…
                                      Well a good completed restart of my Ubuntu box will not hurt.

                                      I tried checking the privileges but i couldn’t log in to MYSQL !!!

                                      ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

                                      Thankfully i had that problem before and from my notes i fixed it (the file i sent you guys before ERROR 2002)

                                      reset MYSQL

                                      /etc/init.d/mysql restart

                                      AND NOW I DO HAVE ----- GRANT_PRIVI ---- for root@localhost

                                      Oh man !!!

                                      Not sure what happened, but i had to remove the mysql which i thoght i had done a couple of times but i wasn’t doing it right than do a manual install mysql server

                                      It was never fog it was MYSQL0_1458772189713_rootMysqlPriviledgesYES.JPG

                                      Thanks a lot guys !!! Hope this helps someone in the future !!!

                                      Wayne WorkmanW 1 Reply Last reply Mar 23, 2016, 10:32 PM Reply Quote 0
                                      • Wayne WorkmanW
                                        Wayne Workman @ciranodd
                                        last edited by Wayne Workman Mar 23, 2016, 4:33 PM Mar 23, 2016, 10:32 PM

                                        @ciranodd I don’t understand why you are having so many problems. With Ubuntu, After Ubuntu is installed, you just checkout a copy of fog trunk and then run the installer. that’s it.

                                        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                                        Daily Clean Installation Results:
                                        https://fogtesting.fogproject.us/
                                        FOG Reporting:
                                        https://fog-external-reporting-results.fogproject.us/

                                        C 1 Reply Last reply Mar 24, 2016, 12:06 AM Reply Quote 0
                                        • C
                                          ciranodd @Wayne Workman
                                          last edited by Mar 24, 2016, 12:06 AM

                                          @Wayne-Workman
                                          Hey Wayne !!!

                                          That’s exactly what i though !!! But it was never FOG it was MYSQL that somehow wast not giving the right privileges to the root user for localhost

                                          I am able to load the WEB GUI !!! Now i am going to start playing with it !!!

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          1 / 2
                                          • First post
                                            3/24
                                            Last post

                                          178

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project