edward19283 Posted November 22, 2004 Posted November 22, 2004 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 Quote
borfast Posted November 22, 2004 Posted November 22, 2004 (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 November 22, 2004 by TCH-Raul Quote
edward19283 Posted November 22, 2004 Author Posted November 22, 2004 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"); Quote
TCH-Dick Posted November 22, 2004 Posted November 22, 2004 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'); Quote
edward19283 Posted November 22, 2004 Author Posted November 22, 2004 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! Quote
TCH-Don Posted November 23, 2004 Posted November 23, 2004 Welcome to the Family Edward and your new home! We really are like family here. So if you need anything, just ask your new family! We love to help Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.