CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 MySQL

Print topic Send  topic

Author Message
roy
Posted: 11/21/2002, 3:46 AM

I am working quite some time now with cc and ccs. Mostly I use php and MySQL on a Windows server. Since the performance on a Linux machine is better for the two mentioned, I am beginning with linux Mandrake 9.0. But I have a problem with MySQL, from the local machine I can connect to the database. But as soon as I want to connect to the MySQL from another machine in the local network or over the internet, it doesn't work. I post messages on a lot of forums, but I can't get it working. Further I am using the default installation of the Apache , Php and MySQL package within Mandrake. Question: Where can I configure MySQL for access from other machines? Please help, I want to start with developing and not configuring the server.

Roy
RonB
Posted: 11/21/2002, 7:23 AM

First of, get the phpmyadmin(www.phpmyadmin.net) package and install. This gives you a webbased database administration tool for mysql. It's great and easy to use.

Mysql Users get priveleges per host. Porbably the user you use to connect in your project only has priveleges for the host localhost. With phpmyamin create a new user with host option set to anyhost. Use this user in your project and your problems should be over..... if mysql was to blame that is.

Within linux it's quite possible that for your local network acces is ok to Apache but connections from outside your network are refused. Is there a firewall on your mandrake box?

For these things I use the package webmin(www.webmin.com) that allows you to configure a lot of servers on your linux box from, again, a webbased interface. I highly recomend it. I didn't get squid running on my system until I ised webmin to configure the beast.

Hope this helps,

Ron
roy
Posted: 11/22/2002, 3:31 AM

Thanks Ron,

Indeed I have the webmin package installed. Here I can choose module config
for MySQL server. Here I can choose 'MySQL host to connect to', default 'localhost' is selected, but you can also give another host. Since I want to connect through the internet to the mysql database, should I put here the ip of the local machine or the internet ip. Besides that if I make changes here in the module config for MySQL, a username and password is asked. I tried all the user/ password combination I used, but they are all incorrect. Is there a default password or something for this.

Thanks

Roy
RonB
Posted: 11/22/2002, 5:10 AM

Dont use webmin for mysql configuration but phpmyadmin. This is a lot easier. Only use webmin to check if Apache is allowed to react to connection requests from outside your local network. This is by the way easy to check. Just ask someone to connect thrue a browser to your ip number. if the get the index.html from apache everything is fine if not somewhere on your linuxbox something is blocking outside connections.

In phpmyadmin configure a user that can connect to anyhost wich should solve the problem of mysql not reacting.

RonB
feha
Posted: 11/22/2002, 5:22 AM

If You have controll over your hosting computer...

You would need a router to redirect your internet IP to local IP ...
And open port 3306 ...
Example
http://yourinternetIP:3306
instead of localhost ...

Preferable to make conection by secureway (VPN or something else)

regards
feha
[www.vision.to]
roy
Posted: 11/23/2002, 5:04 AM

I have copied and renamed my-small.cnf to /etc/my.cnf.
Through a terminal I requested the status of skipnetworking with the command mysql variables, skip networking is off. Also I have made a user with all priviliges who may connect from any host %. Also the port 3306 is mapped on the router to the dedicated server.

Would it have something to do that MySQL uses a socket connection.

I don't now what to anymore with this.

Please assistance.

Roy
feha
Posted: 11/23/2002, 6:17 AM

This way You did it should work!?
Search for more info at www.mysql.com (remote connection).
I don't know what to suggest more!?




regrads
feha
[www.vision.to]
Roy
Posted: 11/23/2002, 9:49 AM

Thanks Feha, I think you pointed me in the good direction. Remote Connect was the keyword I needed on www.mysql.com. Indeed as I also said in my last post, it has something to do with the socket connection. It seems that there are two ways to connect to mysql one by tcp/ip and the other with a socket connection.
Mandrake uses the socket connection which should be faster, but can only be used when connecting to a server on the same computer.

What I need to find out now is how I can change the socket connection to a tcp/ip connection???

Roy
DaveRexel
Posted: 11/23/2002, 6:26 PM

A very good tutorial which could help you

http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html

Greetings
Dave
roy
Posted: 11/29/2002, 1:06 PM

I am getting a little tired of this. I am searching for at least two weeks now and still cannot connect to mysql, except from the local machine.

Please tell me what to do.

Kind Regards,

Roy
jjtoubia
Posted: 11/29/2002, 1:39 PM

I didn't read all the replies so I don't know if this was mentioned. If you are using Windows and you want to make a direct connection to another database, then you need MyODBC installed on your Windows machine. MyODBC is available from mysql.com in two different versions. The 2.50 stable release and the 3.51 development release. Personally I use the development release, its better. Anyway, here is a link to download MyODBC 3.51.

http://www.mysql.com/Downloads/MyODBC3/MyODBC-3.51.04.exe

Hope this helps!
jjtoubia
Posted: 11/29/2002, 1:46 PM

I have now read the rest of your posts. YOur MySQL installation sounds like it is fine. You should not have to worry about that anymore. MySQL is the server of course, and it will allow remote connections made to it so long as there is a client to make that connection. That client is the MyODBC (or PHP, Perl etc.). You could install any PHP program that makes a MySQL connection and you could connect to a database remotly that way but that obviously doesn't help cause you need CC or CCS to be able to make that connection. Since CodeCharge is a Windows application, it needs to be able to have the Windows drivers (MyODBC) to be able to make an external connection to a MySQL database.
JD
Posted: 11/29/2002, 3:49 PM

I feel your pain. I had this problem a while ago. In phpmyadmin add your user to the user table. add the user to the db table in mysql db.

on the mysql host type mysqladmin reload

this reloads the grant tables.

Like the other posts say, download myodbc from mysql.com this will allow you to connect to the db using odbc.

phpmyadmin is a great tool.

in cc and ccs. be sure to use localhost as the server for the server data connection when in settings or project properties.

Just some thoughts.

J.D.
Provident Bank
roy
Posted: 12/02/2002, 3:51 AM

Thanks, I reloaded the permissions, but it still doesn't work.
roddy
Posted: 12/14/2002, 6:40 PM

Try starting mysqld with the --skip-name-resolve option. I had this same problem and it came down to not being able to resolve hostnames to IPs on the LAN. I started using this option and it's fine now. Though I would only use this on a development server behind a firewall.

roddy
Jeff Turkington
Posted: 12/15/2002, 12:49 PM

You can also try the free tool that Urban Research produces that allows you to manage MySQL and numerous other db's remotely. To use with MySQL, you must install MyODBC as in previous posts.

http://www.urbanresearch.com/software/utils/urbsql/

Regards,
Jeff Turkington
Turkington & Associates Ltd.
http://www.turkington.net

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.