WebFaction
Community site: login faq

i was wondering how do connect to the mysql db that i have made on the backend? im using

$conn = mysql_connect('localhost','username','password','mysql_db') or trigger_error("SQL", E_USER_ERROR);

and i keep getting an error saying

Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'username'@'web??.webfaction.com' (using password: YES) in example.php on line 13 what is going on?

asked 25 Sep '12, 13:10

ericspecullaas
1136
accept rate: 0%


You should be using the name of your database as the username. More information is available in our documentation: Databases

permanent link

answered 25 Sep '12, 13:14

seanf
12.2k41836
accept rate: 37%

thanks you very much I didnt have the db with the username like username_db

(25 Sep '12, 13:22) ericspecullaas
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×168
×1

question asked: 25 Sep '12, 13:10

question was seen: 7,160 times

last updated: 25 Sep '12, 13:22

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM