We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8700
    • 12 Posts
    Connection to host: failed!

    How can i connect to a database successfull if i dont know the name of the database?
      • 15082
      • 195 Posts
      To connect to the DB you need the hostname ("localhost" if on the same server), the DB user and the password of the DB user.

      Greetz
      JUSI
        • 8700
        • 12 Posts
        It’s not localhost, it’s an IP.

        This database is not the only one on that server.
        I cant connect to a database to test it if i cant input the name of the database, i dont have anything to test.
          • 15082
          • 195 Posts
          The connection test doesn’t login into the DB, it only looks if it can connect to the DB server with the username/password you provided. If this fails, there must be something that prevents it from connecting to your DB server.

          Just a thought:
          - 1st problem: → Test database server connection and view collations.
          When i press this, i receive Forbidden (seen with Firebug) and nothing happend.
          I changed in manager\media\script\mootools\mootools.js the POST with GET and now when i press
          → Test database server connection and view collations. i receive:
          Connection to host: failed!
          Maybe you’ve some JS blocker installed in your browser thats prevents the correct execution of the script?

          Greetz
          JUSI
            • 8700
            • 12 Posts
            It’s not possible to connect to a database server if you dont know the database name.

            Since here i cant input the database name, it wont works.

            I will try to modify all the installer.

            Have a nice day.
              • 15082
              • 195 Posts
              It’s not possible to connect to a database server if you dont know the database name.
              Sure it is, works fine for me - and I think - for the most other people here too.

              Since here i cant input the database name, it wont works.
              I will try to modify all the installer.
              Have a nice day.

              I understand that your’re peeved about the fact it’s not working for you at the moment.
              Anyhow, in my opinion it would be nice if you don’t be that harsh to the people trying to help you... wink

              Greetz
              JUSI
                • 8700
                • 12 Posts
                I try to install it for 6 hours... undecided
                That’s the reason if i’m "harsh".....
                Thank you for your help.
                  • 4749
                  • 623 Posts
                  Quote from: elianus at Sep 23, 2009, 09:45 AM


                  1. I created the database + user ON SERVER, BY CONTROL PANEL.
                  I don’t create the database using modx installer.


                  What Control Panel are you using? A control panel will NOT set up a database for you without giving you the opportunity to name it and assign users to that database. Unless, for some reason, it creates the database first then gives you the opportunity later to then name it and add users. Regardless of how that works, your problem is not with ModX. Your problem is related to the control panel creation of the database. Go back into your control panel and select it to see if it will show you the name. Then see if you can add a user to the database.

                  Again, I think it would be pretty silly if a control panel created a database with a user/pass and didn’t tell you what it was. Else, what’s the use? Think about what you’re asking again, then post back.
                    The MODx has you...
                    Utah Web Design
                    • 5340
                    • 1,624 Posts
                    What do you have in you DB Host field?

                    Some host do not work with "localhost". You need to enter the name of a server: db.host123.com.

                    If you have Cpanel you should be able to see the above information along with the username and the password. Some hosts take time to set up the database but not 6 hours.

                    You can also try:

                    - to talk to your host
                    - create a simple php page that connects to the DB

                    Good Luck
                      • 8700
                      • 12 Posts
                      i have more than 100 sites on that server.
                      The CP is Plesk.

                      The database is setup correctly, with all 4 parameters: hostname, database name, username and password.

                      I think it’s a issue from modx with _POST variable.