Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Derek on December 28, 2003, 05:36:23 AM

Title: mysql port 3306
Post by: Derek on December 28, 2003, 05:36:23 AM
Just installed 6.03 and trying to connect to my php pages,  and i get the "could not connect error" i did a port scan from the root and see that port 3306 is not open
also installed port scanner in the server manager and it show enableable ports and then ports enabled and 3306 mysql is only in the enableable not enabled
how do i fix this problem, it seems like i just dont have the port working or something
have searched the forums and the web and cannot find the answer
i know u guys will have the answer somewhere
thanks

Derek
Title: Re: mysql port 3306
Post by: jb on December 28, 2003, 06:03:12 AM
Try this link:  http://forums.contribs.org/index.php?topic=19145.msg75725#msg75725
JB
Title: Re: mysql port 3306
Post by: Derek on December 28, 2003, 06:13:09 AM
That was the problem.

thank you very much for that its been bugging me all day

Derek
Title: Re: mysql port 3306
Post by: John Mackenzie on December 28, 2003, 12:30:21 PM
Derek,

You may have already solved the problem, but if you want to be able to open/close ports (eg. port 3306) then download and install the port opening rpm from my ftp server at:  
ftp://ftp.westernportmedical.com.au  

You need this port opened when using a java applet to connect to a mysql database, but I'm not sure if this is your problem here.  

I have found that whenever I upgrade my e-smith server, for some reason my mysql root password gets corrupted, causing an internal server error message on all php pages which need to connect to the mysql database - from memory the error message reads "unable to connect to database at localhost for passwords Yes (or something similar).  

I have therefore had to reset my mysql root password after I update e-smith.  To find out how to do this, do a google search on mysql+root+password+change ... this URL:  
http://mefriss1.swan.ac.uk/htmlhelp/php/page.php/37/apas04.html  

... tells you how to reset the mysql root password: -

 "If you have set a root password, but forgot what it was, you can set a new password with the following procedure:

Take down the mysqld server by sending a kill (not kill -9) to the mysqld server. The pid is stored in a .pid file, which is normally in the MySQL database directory:

shell kill cat /mysql-data-directory/hostname.pid

You must be either the Unix root user or the same user mysqld runs as to do this.

Restart mysqld with the -skip-grant-tables option.

Set a new password with the mysqladmin password command:

shell mysqladmin -u root password 'mynewpassword'

Now you can either stop mysqld and restart it normally, or just load the privilege tables with:

shell mysqladmin -h hostname flush-privileges

After this, you should be able to connect using the new password. "


HTH.
- John Mac