Jump to ContentJump to Navigation/Login
` ` ` ` ` `

[Register]

Occasional ATutor release updates


No Members Logged In

(6 guests in past 15 min.)

Access Understanding Web Accessibility to learn about accessibility, or Register to take the course for FREE.

Support Forums

ATutor Support

Unable to connect to database (not mistyping anything)


You must be signed-in to post.

AuthorSubject
  Page: 1
jwitko
ss.jpg

Attachment: ss.jpg
Subject: Unable to connect to database (not mistyping anything)Quote this post in your reply
Operating system ATutor is installed on -
ATutor version - 1.6.4
Patch #s applied - none
ATutor theme name - default
PHP version - php-5.3.2
MySQL version - mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (i686) using readline 5.0
Webserver & version - Apache/2.2.15 (Unix)
Copies of error messages - Unable to connect to database server.
Changes to default settings - None.
Web browser being used - Firefox.

...and anything else relevant - CentOS 2.6.18-92.1.18.el5

My user and pass are definitely correct (user1/user1). server address is 'localhost', port is correct and open. Proof is below:


[root@nocdev4-mii var]# mysql -u user1 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.0.51a MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| atutor |
+--------------------+
2 rows in set (0.00 sec)


mysql> show grants for 'user1'@'localhost';
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for user1@localhost |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'user1'@'localhost' IDENTIFIED BY PASSWORD '5226b4b67c3db6de' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON `atutor`.* TO 'user1'@'localhost' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)






[root@nocdev4-mii var]# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
5
5.0.51a,]-g>@ggQ,<wet8W1,)(-H


[root@nocdev4-mii var]# netstat -a | grep mysql; netstat -ln | grep 3306;
tcp 0 0 *:mysql *:* LISTEN
tcp 0 0 localhost.localdomain:mysql localhost.localdomain:52865 TIME_WAIT
unix 2 [ ACC ] STREAM LISTENING 5063393 /var/lib/mysql/mysql.sock
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN

telnet from an outside machine:

[jwitkowski@noc-sc1.sc1 ~]$ telnet nocdev4-mii 3306
Trying 192.168.40.24...
Connected to nocdev4-mii.liveops.com (192.168.40.24).
Escape character is '^]'.
5
5.0.51a-#}q@)Iw;,]BtC1jBI(,EV


[root@nocdev4-mii var]# ps -ef | grep mysql
mysql 13331 1 0 03:06 ? 00:00:00 ./mysqld


Apache is obviously running without issue as i can get to the installation screen to get the unable to connect to DB message.

Any help you guys could provide would be amazing.

Thank you,

-jwitko
Posted: 2010-03-18 19:30:06
jwitko
Subject: Re: Unable to connect to database (not mistyping anything)Quote this post in your reply
replacing "localhost" in the installation step with "127.0.0.1" fixed this. Apparently there is a mysql user flag i did not set to allow accessibility from external sources. Even though they were on the same box this apparently affected the outcome.
Posted: 2010-03-18 20:31:12
 Page: 1

You must be signed-in to post.