Koozali.org: home of the SME Server

mysql connection help

Brad

mysql connection help
« on: November 28, 2003, 07:24:03 AM »
Hello,

I am having a small problem with MySQL.  I can not get ColdFusion MX 6.1 to connect to the database server on 'localhost'. I get this error message when trying to connect:

  >Connection verification failed for data source: UPB
  >[]java.sql.SQLException: Cannot connect to MySQL server on
  >192.168.1.197:3306. Is there a MySQL server running on the machine/port you
  >are trying to connect to? (java.net.ConnectException)
  >The root cause was that: java.sql.SQLException: Cannot connect to MySQL
  >server on 192.168.1.197:3306. Is there a MySQL server running on the
  >machine/port you are trying to connect to? (java.net.ConnectException)

I have phpmyadmin installed (I saw this posed in the forums to try), and it works very well.

Another thing I was posted (for another topic) was to use the 'netstat -a' command to see if there is a port 3306 running. But I don't know exactly what to look for.

Can someone look at my output for the netstat command and tell me if MySQL is running?  

Thank-you.




# netstat -ael
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode
tcp        0      0 *:printer               *:*                     LISTEN      root       1700
tcp        0      0 *:afpovertcp            *:*                     LISTEN      root       2468
tcp        0      0 *:ldap                  *:*                     LISTEN      root       1779
[root@server2 htp_drivers]# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:printer               *:*                     LISTEN
tcp        0      0 *:afpovertcp            *:*                     LISTEN
tcp        0      0 *:ldap                  *:*                     LISTEN
tcp        0      0 *:netbios-ssn           *:*                     LISTEN
tcp        0      0 *:pop                   *:*                     LISTEN
tcp        0      0 *:imap2                 *:*                     LISTEN
tcp        0      0 *:www                   *:*                     LISTEN
tcp        0      0 *:auth                  *:*                     LISTEN
tcp        0      0 localhost:http-admin    *:*                     LISTEN
tcp        0      0 server2.bob:domain *:*                     LISTEN
tcp        0      0 *:ftp                   *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:squid                 *:*                     LISTEN
tcp        0      0 *:smtp                  *:*                     LISTEN
tcp        0      0 *:1723                  *:*                     LISTEN
tcp        0      0 *:https                 *:*                     LISTEN
tcp        0      0 server2.bob.c:ssh brad.bob.com:3020 ESTABLISHED
udp        0      0 server2.bob:netbios-ns *:*
udp        0      0 *:netbios-ns            *:*
udp        0      0 server2.bob:netbios-dgm *:*
udp        0      0 *:netbios-dgm           *:*
udp        0      0 localhost:domain        *:*
udp        0      0 server2.bob:domain *:*
udp        0      0 *:icp                   *:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  12     [ ]         DGRAM                    751    /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     1701   /var/run/lprng
unix  2      [ ACC ]     STREAM     LISTENING     620    /var/lib/cvm/cvm-unix-local.socket
unix  2      [ ACC ]     STREAM     LISTENING     2308   /var/lib/mysql/mysql.sock
unix  2      [ ]         DGRAM                    2460
unix  2      [ ]         DGRAM                    2459
unix  2      [ ]         DGRAM                    2428
unix  2      [ ]         DGRAM                    2324
unix  2      [ ]         DGRAM                    2268
unix  2      [ ]         DGRAM                    1771
unix  2      [ ]         DGRAM                    1373
unix  2      [ ]         DGRAM                    1304
unix  2      [ ]         DGRAM                    968
unix  2      [ ]         DGRAM                    766

Charlie Brady

Re: mysql connection help
« Reply #1 on: November 28, 2003, 06:04:26 PM »
Brad wrote:

>   >The root cause was that: java.sql.SQLException: Cannot
> connect to MySQL
>   >server on 192.168.1.197:3306. Is there a MySQL server
> running on the
>   >machine/port you are trying to connect to?

If you are running 6.0beta3, you should read the Release Notes. There it will tell you that mysql is configured to only listen to a unix domain socket, not a TCP port. IIRC, it also tells you how to change the default configuration.

(Note also that 192.168.1.197 is not "localhost")

Charlie

Brad

Re: mysql connection help
« Reply #2 on: November 29, 2003, 05:09:58 AM »
Thank-you Charlie! That was just what I needed!


(Here is a link for convience for anyone else: http://public.planetmirror.com/pub/e-smith/dev/6.0dev/RELEASE-NOTES.txt)Charlie Brady wrote:

Rick Havinga

Re: mysql connection help
« Reply #3 on: January 09, 2004, 09:41:51 PM »
Thanks for this tip also.  I have been avoiding Version 6 because of this issue.
I figured it had to be a security thing they added.

Rick

brad

Re: mysql connection help
« Reply #4 on: January 10, 2004, 03:42:47 PM »
Rick,

FYI, I put up a howto at http://www.bdwebtech.com/~contribs.  

--Brad

[%sig%]

bearau

mysql connection help
« Reply #5 on: August 04, 2004, 11:07:33 AM »
to my knowledge i have never clicked a link to
http://www.bdwebtech.com/~contribs that has actually worked this is most frustrating as i just spent 20 minutes looking for the fabled "release notes" for v6.0 to no avail. this problem has been bugging me for the better part of 3 hours and now i find the one link that promises salvation is broken!!!!

Garfield

mysql connection help
« Reply #6 on: August 07, 2004, 06:07:33 PM »
Hello,

I have been testing SME off and on for the past 1,5 years, but with the release of SME 6 I have decided to finally toss away my Microsoft-based Web/Mail server and switch to SME.

So, here I am, trying to reproduce my websites on the SME box. My websites rely on PHP/MySQL, so I need to work on that. I know about users etcetera, and have set that up successfully. BUT, what I want too is to make a connection from my XP workstation to the MySQL db on the SME system. From the posts above I gather that I must change some config setting for MySQL, but the links provided above do not work.

Can anyone please point me in the right direction ?
I have searched contribs.org, and even the Internet but have not been able to find the solution so far.

Any help is greatly appreciated.

Best Regards,

Arvid

Offline teranic

  • **
  • 21
  • +0/-0
mysql connection help
« Reply #7 on: August 07, 2004, 08:45:18 PM »
From the release notes:

The mysql database daemon is configured by default to accept only
  local connections (i.e. it is not accessible via the network).
  This is a security precaution. We only use mysql for webmail
  preferences, and only require access from localhost.

  If you wish to enable local network access, you can do so via:

  /sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
  /sbin/e-smith/expand-template /etc/my.cnf
  /etc/rc.d/init.d/mysqld restart

http://no.longer.valid/phpwiki/index.php/SME%20Server%20Announce%20v6.0
.........

Garfield

Thanks !
« Reply #8 on: August 07, 2004, 10:56:42 PM »
Thanks !

This is exactly what I needed, it works fine !
I actually searched this site for the release notes, using "Search Site" and keyword "release", but that didn't yield the desired result .