1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XenForo mysql issues

Discussion in 'Troubleshooting and Problems' started by L315, Apr 29, 2013.

  1. L315

    L315 New Member

    What I get when inspecting element in Chrome.

    <!-- Access denied for user 'mcmain'@'localhost' (using password: YES) -->

    Recently let a staff member go. Switching all passwords for security. I changed /library/config to the necessary database, user and user password so that XenForo knows that database to load for the webpage.

    I believe it is some sort of privileges error.

    In phpMyAdmin it lists 3 users under privileges for this database. I will list these below.

    (user - host - type - privileges - grant)
    mysql - localhost - global - all privileges - yes
    root - local host - global - all privileges - yes
    xenforo - local host - global - all privileges - no
    Any ideas?
  2. Jeremy

    Jeremy Well-Known Member

    Looking at the users, mcmain isn't a user for your XenForo database. Try adding the user mcmain with your password and granting it privileges to your XenForo database.
  3. MattW

    MattW Well-Known Member

    Well your users listed from phpMyAdmin don't list a user called mcmain

    Have you actually added that user to the database and granted all the correct permissions?
  4. L315

    L315 New Member

    Just removed mcmain user and re-added under database xenforo with all permissions (exluding the grant permission). I really do not understand where mcmain is getting called from. I have the user xenforo, the database xenforo and the appropriate password in the /library/config.

    Before it was not listed under the database, now it is. mcmain did actually exsist as a user. As mentioned above it is now listed under the "xenforo" database.
  5. Jeremy

    Jeremy Well-Known Member

    Can you post a snip of your config.php (obviously removing your password)?

    Or what page you are trying to access where you get the above error?
  6. MattW

    MattW Well-Known Member

    Is that error for the mcmain user present on all pages, or just a certain few?
  7. L315

    L315 New Member

    First off, excellent question. The index.html is not working entirely. It looks like specific threads can be linked to if you know the full adress, however, there is no content.

    Instead of index I tried going to the main forums. I got this error:

    An exception occurred: Access denied for user 'mcmain'@'localhost' (using password: YES) in /digitalforge/www/www.digitalforgeonline.com/library/Zend/Db/Adapter/Mysqli.php on line 333
    1. Zend_Db_Adapter_Mysqli->_connect() in Zend/Db/Adapter/Abstract.php at line 459
    2. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 773
    3. Zend_Db_Adapter_Abstract->fetchAssoc() in EWRporta/Block/VotifierLeaderboard.php at line 14
    4. EWRporta_Block_VotifierLeaderBoard->getModule() in EWRporta/Model/Blocks.php at line 116
    5. EWRporta_Model_Blocks->getBlockParams() in EWRporta/ViewPublic/Custom.php at line 71
    6. EWRporta_ViewPublic_Custom->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 215
    7. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 67
    8. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 533
    9. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
    10. XenForo_FrontController->run() in /digitalforge/www/www.digitalforgeonline.com/index.php at line 13
  8. Jeremy

    Jeremy Well-Known Member

    Can you access your ACP? Does disabling listeners in the configuration file fix this (I'll look up the code now)?

    To disable listeners:
    $config['enableListeners'] = false;
    Digital Doctor likes this.
  9. Andrej

    Andrej Well-Known Member

    What grant permission are you talking about? As far as I am aware you have to give the db user full permissions.
  10. L315

    L315 New Member

    <!-- Access denied for user 'mcmain'@'localhost' (using password: YES) -->
  11. Jeremy

    Jeremy Well-Known Member

    What pages is this happening on? Have you tried disabling listeners? Can you access your ACP?
  12. tyteen4a03

    tyteen4a03 Well-Known Member

    (and obviously, check if your mysql username and password are correct)
  13. L315

    L315 New Member

    I can access the ACP. I know I am not a superadmin. I do not know how to retrieve my user ID to add to the /library/config. I also do not know how to disable listeners.

    And the Access denied is happening on the default page.
  14. Jeremy

    Jeremy Well-Known Member

    Read my reply above, I gave you the code to disable listeners. However, I believe this is an issue with XenPorta since you have access to your ACP. Specifically with the VotifierLeaderBoard block.
  15. L315

    L315 New Member

    Sorry, I did not see this. Exactly where do I put this?
  16. Jeremy

    Jeremy Well-Known Member

    Anywhere within your configuration file.
  17. borbole

    borbole Well-Known Member

    Did you change the db details at the config.php file only or did you create a new user and password at the mysql area as well? If so, make sure that the new db user has full permissions/access to the db that it is assigned to. One of the 2 things are causing your error, the permission thing and/or incorrect name entered in the config.php file.
  18. Jeremy

    Jeremy Well-Known Member

    His configuration details in config.php are correct, he's able to access the ACP. Something in the front end is causing the issue.
  19. L315

    L315 New Member

    Alright, that worked and sent me to the main forum page. There should however be a front page that lists Announcements, etc. I have to run for the time being, but will post again when I can give you guys/gals more info to help me. I really appreciate it and thank you for the help so far.
  20. Jeremy

    Jeremy Well-Known Member

    What XenPorta blocks do you have? I believe the issue is occurring within XenPorta's blocks.

Share This Page