Configure host database if you do not know

romeo

Newbie
Messages
27
Likes
0
Points
1
When installing WordPress one of the basic elements to connect to the database, plus the MySQL username and password is the name of the server, known as the  hostname, a fact that you usually facilitates your host but what unless you give him?

As the same home screen installing WordPress tells you, in 99% of cases the server name is localhost, but you know it's precisely is 1% which usually make war, especially when your hosting provider does not you help matters.

There are suppliers who do not use that standard, but the following:
  1. 1and1 Hosting - db12345678
  2. DreamHost - mysql.example.com
  3. GoDaddy - h41mysql52.secureserver.net
  4. ICDSoft - localhost: /tmp/mysql5.sock
  5. MediaTemple (GS) - internal-db.s44441.gridserver.com
  6. Pair Networks - dbnnnx.pair.com
  7. Yahoo - mysql

But if it does not work or  localhost or are in any of the above providers you can always use a trick of the configuration file  wp-config.php  to get you out of the mess on more than one occasion.

The idea is to replace the following line:
Code:
/ ** MySQL Host (you probably do not need to change) * /

        define ( 'DB_HOST' , 'localhost' );

By the following:
Code:
/ ** MySQL Host (you probably do not need to change) * /

        define ( 'DB_HOST' , $ _ENV DATABASE_SERVER {});

What makes the new line is to try to resolve the host of the database without having to enter it manually. Guards changes and in most cases will retrieve the name of your server and everything will work properly.
 

Members online

No members online now.