Jump to content

Recommended Posts

Posted

I wish to setup a MySQl database. I created the DB, created the user, linked the user to the DB, and get errors connecting to the DB. Someone in support told to use the server IP instead of "localhost". What is my server IP...my domain name? I tried that and still get the same error. Thanks

Posted (edited)

First of all, welcome to the family, edward! :)

 

As for your problem, using localhost should work in any situation... the equivalent IP would be 127.0.0.1 but if your script didn't work when using "localhost", I don't think it will work if you use "127.0.0.1".

 

Can you provide some more details?

 

Also, moving to a more appropriate forum, for better organization and exposure.

Edited by TCH-Raul
Posted

Here is a copy of the connection strings I get when I am at the MySQL account maintenance page.

 

Connection Strings

Perl $dbh = DBI->connect("DBI:mysql:alnypxuv_wordpress1:localhost","alnypxuv_edward","<PASSWORD HERE>");

PHP $dbh=mysql_connect ("localhost", "alnypxuv_edward", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());

mysql_select_db ("alnypxuv_wordpress1");

Posted

If you trying to setup WordPress then your settings in wp-config should be

>define('DB_NAME', 'alnypxuv_wordpress1');
define('DB_USER', 'alnypxuv_edward');
define('DB_PASSWORD', 'password'); 
define('DB_HOST', 'localhost');

Posted

I had not yet installed wordpress, but after posting here, I thought I'd try it and perhaps whatever I was seeing via the MySQL CP was unrelated. That turned out to be correct. The install went fine and all is working properly. Thanks for the help!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...