can anyone help please, cant connect to db

Started on the old forum in February 2010 · view the original in the archive · old links redirect here

9 replies · 658 views · started 16 years ago · 1 min read

6 participants
convictor Developer · 114 posts #1

i have tried several scripts, the latest i tried now with riderz's simple php forum. no matter how i do it, i just cant get scrits to connect to the datbase. i follow instructions to the letter, but to no avail, i added a db user to the db i want to use, edited the files, config etc, with the db username and password, but i just keep on getting erroer Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'moboholi_conrad'@'localhost' (using password: YES) in /home/mobiholi/public_html/main_forum.php on line 9 cannot connect

should i change in the script where it show localhost to something else? please, i would appreciate it if someone can help me

Why cry for a soul set free?

bOrN2pwn Developer · 230 posts #3

Paid server should look like this

$dbname = "name_name "; //change to your mysql database name
$dbhost = "localhost"; //database host name
$dbuser = "name_name2 ";
$dbpass = "123456 ";

Name is whatever you called your databases

Free Hosting

$dbname = "name_name "; //change to your mysql database name
$dbhost = "http://sql.yoursqldomain.com "; //database host name
$dbuser = "name_name2 ";
$dbpass = "123456";

Hope you get the picture

BakGat

class Counter {
public:
  void Count();
  int  ReadDisplay();
private:
  int  CurrentCount;
};

External image (may be gone) External image (may be gone) External image (may be gone)

Back up my hard drive? How do I put it in reverse? http://www.hackthissite.org Profile…

convictor Developer · 114 posts #4

Paid server should look like this

$dbname = "name_name "; //change to your mysql database name
$dbhost = "localhost"; //database host name
$dbuser = "name_name2 ";
$dbpass = "123456 ";

Name is whatever you called your databases

Free Hosting

$dbname = "name_name "; //change to your mysql database name
$dbhost = "http://sql.yoursqldomain.com "; //database host name
$dbuser = "name_name2 ";
$dbpass = "123456";

Hope you get the picture[/QUOTE

im using paid hosting, and the first one you show is how i did it, i even asked the host, and his reply was the same. what freak me out, i tried out some of the scripts one get in fantastico, and it install without any problem, and it work too. i cant even get a online/ hits script to connect. i checked out the php configuration on the cpanel, and i see there global regiter is set to off. can that be the problem? and how can i set it on, cause i see there the server administator can set it to on

Why cry for a soul set free?

huwad Developer · 215 posts #5

I think his on paid hosting.. try to go to your mysql databases.. and give permision to access your database

first you must add user to database External image (may be gone)

2nd assign privilege.. better to check all, and its done External image (may be gone)

hacking is like sex. you get in, you get out and you pray you left nothing behind.

convictor Developer · 114 posts #6

i did that too, yesterday i tried a smf forum, and it auto installed too without problem, and running without problem. But stuff that i want to connect dont wanna lol, its really freaking me out

Why cry for a soul set free?

kei_ki7 Senior · 431 posts #7

did you edit the two config.php already?

Did I help you? You can help me too Your donations will help me finance my studies.

convictor Developer · 114 posts #8

Yes i edited the config files on some scripts i wanted to try out, some lava scripts, one toplist, and now the online script, as well as the simple forum that riderz had here in tutorials. Nothing..

Why cry for a soul set free?

ksg91 Developer · 162 posts #9

first create table of some name and then put all details like database name, host, username, password in your config file. and remember, username and password of mysql database user may be different from your ACCOUNT/CP's un and pw.

Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

sanju Developer · 59 posts #10

Localhost function may not working in ur hosting. Findout the database server host address by go to ur database and replace it with 'localhost'. I think ur prob be solvd

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close