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

1&1: Denied access to the database

Discussion in 'Installation, Upgrade, and Import Support' started by soloarquitectura, Oct 6, 2010.

  1. soloarquitectura

    soloarquitectura Active Member

    The installer says:
    Your server meets all of XenForo requirements and you're now ready to begin installation.

    Knowing that the MySQL port for 1&1 is: /tmp/mysql5.sock
    I put it, but the installer tells me:

    The following error occurred while connecting to the database:
    Access denied for user: 'dboXXX@localhost' (Using password: YES)
    This indicates that your configuration information is not correct. Please check the values you have entered. If you are unsure what values are correct or how to proceed, please contact your host for help. These values are specific to your server.

    I edited the config.php manually:
    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '/tmp/mysql5.sock';
    $config['db']['username'] = 'dboXX';
    $config['db']['password'] = 'XXX';
    $config['db']['dbname'] = 'dbXXX';

    This configuration works well with vBulletin 4:
    $config['Database']['dbname'] = 'dbXXX';
    $config['MasterServer']['servername'] = 'localhost';
    $config['MasterServer']['port'] = '/tmp/mysql5.sock';
    $config['MasterServer']['username'] = 'dboXXX';
    $config['MasterServer']['password'] = 'XXX';

    But still not working :(

    Nevertheless, I added php_value mysql.default_socket "/tmp/mysql5.sock" to .htaccess, as shown here (although is not necessary for vBulletin 4):
    http://www.vbulletin.com/forum/showthread.php?301047-Database-connection-error/page2

    But still not working, so you have to communicate because it is almost certain that the problem is in the interpretation of the port.

    Please do you can fix so we can test the beta?
     
  2. Daracon

    Daracon Member

     
    Walter, Luke F, Max Hodges and 3 others like this.
  3. soloarquitectura

    soloarquitectura Active Member

    Yes!, this solution works.
    Daracon I do not give you 100 Likes because I cannot. :cool:

    Mike, please take note of this for next versions ok? ;)
     
    Max Hodges likes this.
  4. Daracon

    Daracon Member

    you're welcome ;)
    yes, an optional config string would be great, but i can live with the workaround. i had to do the same for vb4 and ipb before ;)
     
    Max Hodges likes this.
  5. Max Hodges

    Max Hodges Member

    thank you so much! i hope they fix this in the next release. required to run on 1and1 servers.
     
    soloarquitectura likes this.
  6. soloarquitectura

    soloarquitectura Active Member

    Yes, please. Each new update it's need to edit Mysqli.php :(
     
    Max Hodges likes this.
  7. Mike

    Mike XenForo Developer Staff Member

    I don't know whether they document this, but using 127.0.0.1 should get it to use a TCP connection, getting around the socket issue anyway. That said, it looks like they're running 2 MySQL servers and who knows the port of the correct one...
     
    Max Hodges likes this.
  8. Max Hodges

    Max Hodges Member

    oh my, that's nearly 6 months old :(
     
  9. Max Hodges

    Max Hodges Member

    port is 3316 is my case. I think it's documented at 1and1, or you can call their server team and ask.
     
  10. Max Hodges

    Max Hodges Member

    I recently had a huge issue with this trying to install a support site (Kayako 4). Kept getting errors and their engineers just told me to contact my hosting provider. After [finally] convincing them that it was a problem with their scripts - and not my database credentials - they patched their code to make it compliant with sockets. That allowed me to install it, but then I had a problem again because their import routines were not written for sockets either.

    Anyway I know from personal experience what a headache this issue can be. If the Xenforo dev team isn't ready to address it, the least they could do is offer a link to this article whenever that error is presented to future users.
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    If 1&1 have so many issues, have you not considered changing hosts?
     
    Mikey likes this.
  12. Slavik

    Slavik XenForo Moderator Staff Member

    Is this just on the 1and1 standard hosting plans? I have never had any issues with their VPS or dedi servers.
     
  13. Max Hodges

    Max Hodges Member



    Use of sockets is not so unconventional. I blame the web app developers - and Zend - not the host. They just need to design their software to optionally allow sockets. As you can see above, it's only takes a couple lines of code to do the trick.

    It's much easier and cheaper to patch a php script than to move my domains, emails, apps and databases somewhere else. But I haven't had many problems with 1and1 at all. Some people hate them, but I've been with them for around 6 years or more. I run x-cart and supporting apps like Kayako and a few installations of WordPress. Was running IPB; but just installed XenForo. Generally it's been a very good experience. I'm on a dedicated server. No real complaints about performance and up-time. I recommend them.
     
  14. Max Hodges

    Max Hodges Member

    @Brogan

    btw, I discovered XenForo over at Kayako. That they are running it for their forums is very good exposure for you. Maybe you can get the x-cart people on board too. Give it to them for free. hell, PAY them to run it if you have to. They have a lot of customers.
     
  15. Max Hodges

    Max Hodges Member

    seems the lastest version doesn't include the fix
     
  16. soloarquitectura

    soloarquitectura Active Member

    Today I have been testing with XenForo 1.0.4:

    $config['db']['host'] = '127.0.0.1';
    $config['db']['port'] = '3316';
    (...)

    It does not work :(
     
  17. Deebs

    Deebs Well-Known Member

    The default port for MySQL installation is 3306 and not 3316.
     
  18. soloarquitectura

    soloarquitectura Active Member

    Of course, but:
    $config['db']['host'] = '127.0.0.1';
    $config['db']['port'] = '3306';
    (...)

    It does not work.
    The only solution, as already noted above, is to edit Mysqli.php.

    It would be a pleasant surprise to find a better solution in XenForo 1.1.
     
  19. Deebs

    Deebs Well-Known Member

    Can you login to your host and run the following and then paste the results here:

    Code:
    netstat -anp | grep -i mysql
    
     
  20. soloarquitectura

    soloarquitectura Active Member

    It's a Managed Server, I do not get any results.
     

Share This Page