Welcome to Geeklog, Anonymous Thursday, May 02 2024 @ 09:22 am EDT

Geeklog Forums

MySQL Access Errors


Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
I'm trying to install GL on my server, and I'm getting the error message about access being denied to MySQL. I've confirmed that the name of the MySQL database and the name and password of the MySQL user are correct.

There's a note in the install docs about naming sure that the name of the MySQL server is correct. Unless this is the host name in the same section of config.php, where else do you set the name of your MySQL server?

If that's not it, than I'm totally and completely lost at this point.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Text Formatted Code
$_DB_host         = 'localhost';   // host name or IP address of your DB server
 
That's pretty non-ambiguous, isn't it?

"localhost" usually works just fine, but sometimes you need to specify a propert server name there.

What is the exact error message that you're getting? Can you confirm that your login really works by some other means (e.g. by logging into mysql from the command line)?

bye, Dirk
 Quote

Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
If I specify my domain name for the host (inactualsize.com), I get this:

Warning: mysql_connect(): Access denied for user: 'username@IP' (Using password: YES) in /path/system/databases/mysql.class.php on line 108
Cannnot connect to DB server


If I use 'localhost' instead, I get this:

Warning: main(/geeklog-1.3.8-1sr4/config.php): failed to open stream: No such file or directory in /path/public_html/lib-common.php on line 69

Fatal error: main(): Failed opening required '/geeklog-1.3.8-1sr4/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /path/public_html/lib-common.php on line 69


Unfortunately, I don't have access to login using the MySQL username. I can only telnet in using my standard shell account. Is there any other information you need?

Jordan
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The second set of error messages (using "localhost") looks like a path problem to me. /geeklog-1.3.8-1sr4/config.php is probably not the correct path to your config.php (I would assume it's longer than that).

So my advice would be: Keep the "localhost" and check your paths.

bye, Dirk
 Quote

Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
Well, it's longer in that there's a string ahead of that:

/home/acctname/public_html/geeklog-1.3.8-1sr4/config.php

is the entire path. I shortened the beginning to just 'path' to name it easier. In this case, I've obviously replaced my shell account name with 'acctname'.

Jordan
 Quote

doh

Anonymous
I also get this message, and I use the localhost syntax...

Warning: mysql_connect(): Access denied for user: 'username@IP' (Using password: YES) in /path/system/databases/mysql.class.php on line 108
Cannnot connect to DB server

how can I test if my mysql server is working?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Here's a minimal script for testing:
Text Formatted Code
<?php

if(mysql_connect ('localhost', 'username', 'password') === false) {
    echo "could not connect to mysql";
} else {
    echo "connected to mysql";
}

?>
 
Replace 'username' and 'password' with the proper values (in single quotes) and see what happens ...

bye, Dirk
 Quote

Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
Do I just create a new file called test.php or whatever, paste this text in, and run it from IE? If so, what directory should I put it in? THe same one with my config.php?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Yeah, just call it test.php and upload it to somewhere on your webspace so that you can type in the url to that file. Put it where Geeklog's index.php is, for example.

bye, Dirk
 Quote

Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
I got 'connected to mysql'

Jordan
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
So it seems you can connect to MySQL just fine. So the problem may be with the access to the database.

I'd suggest you double check that you've entered the MySQL username and password in config.php correctly.

What about the database? Did you create it yourself or has your hosting service created it for you? In the latter case, you should ask them for help.

bye, Dirk
 Quote

Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
No, I created it myself.

I did double-check the MySQL username & password again, and it was right. The password had been a random string, so just to be on the safe side (of myself) I wiped out the MySQL stuff and re-did it with 2 letters only for the database name, username, and password, and I still got the same result.

When I create MySQL databases, I use a link on the control panel from my provider. It just has me enter the database name, and click a button. Initially, I tried using phpMyAdmin to create it, but my access doesn't allow me to create MySQL databases with it. I don't think that this should matter, since I'm creating am empty database, and all I do with the MySQL admin link is open a new, empty database up.

Jordan
 Quote

Status: offline

jsf23

Forum User
Newbie
Registered: 02/07/04
Posts: 7
Well I wiped everything out and started over. This time I CHMOD'd to 777 instead of 775, and made 1 or 2 other little changes, and it worked fine... Weird.

Thanks for the help yesterday though. Hopefully it's smooth from here on.

Jordan
 Quote

All times are EDT. The time is now 09:22 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content