Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 11:34 pm EST
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.
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.
6
13
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"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
8
10
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
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
10
8
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
So my advice would be: Keep the "localhost" and check your paths.
bye, Dirk
11
13
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
/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
14
10
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?
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?
12
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Here's a minimal script for testing:
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
Text Formatted Code
<?phpif(mysql_connect ('localhost', 'username', 'password') === false) {
echo "could not connect to mysql";
} else {
echo "connected to mysql";
}
?>
bye, Dirk
12
11
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
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
13
14
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
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
10
14
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
Thanks for the help yesterday though. Hopefully it's smooth from here on.
Jordan
10
14
Quote
All times are EST. The time is now 11:34 pm.
- 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