FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


brain cramp: What host name to use for mysqli_connect?





boinsterman
What host name do I use for mysqli_connect on http://worldthinker.frihost.org/codeexamples/asqltest.php? I currently get the following warning:

Quote:
Warning: mysqli_connect(): (28000/1045): Access denied for user 'boinster_what'@'host.frihost.org' (using password: YES) in /home/boinster/domains/worldthinker.frihost.org/public_html/codeexamples/asqltest.php on line 14 ...


This is line 14:
Code:
 $con=mysqli_connect($boinster_db_host,$boinster_db_username,$boinster_db_password,$boinster_db_dbname);

(These variables are defined in an include file.)

The code is taken from http://www.w3schools.com/php/php_mysql_select.asp.

I suspect possible values for the host values include these:
frihost.org
worldthinker.frihost.org
host.frihost.org
badai
you need to create mysql user in cpanel. use localhost as host.
boinsterman
I tried localhost and got the same error, implying the username or password were not accepted. I understand DirectAdmin and Cpanel are the same thing for login purposes? Do I create a new email account or a new login key?

I entered a username and password when I created the database, and I thought this was the process of creating a username and password for the database specifically. In fact, the "Modify Password" says
"Modify User <username> in database <db_name>". However, I end up having to log in to phpAdmin with my DirectAdmin usename/password.
Peterssidan
You should use the username and password that you filled in when you created the database and you should be able to use the same username and password to login to phpMyAdmin. If that doesn't work maybe you got the password wrong when you created the database? Note that passwords are case-sensitive.
boinsterman
I am certain the username and password were correct. I've had this problem before--on this webhost account, so I made absolutely certain. I checked first, and got the same error again.

As a test, I changed the username and password (in the database log-in config file) to my DirectAdmin username and password, and it worked properly. I then changed it to the database's username and password again, and it still worked. I think the problem is solved for now.
Related topics
Change host name in FC5
SSH Secure Shell Host
What is my sql host?
Your domain name features...it is FREE?
Mysql server name
Domain name redirection MX entries help required
Site not found
Domain setup woes
db_mysql error
have problem on my sql
Can't access FTP
LOMO
Phpnuke/mysql database help needed
Window$ XP HIDDEN APPS>>>
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.