473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

mysql set up problem

Hi,

I have a mysql setting problem that is driving me mad. Hopefully someone can
give some advice:

On the local network I have windows 2000/iis5 machine running our intranet
site, with php and mysql working ok. Anonymous access is disabled, and root
has been assigned a password and given full access to all tables from all
hosts (i reliase this isn't secure but its only temporary for testing)

The local intranet site which uses php/mysql works fine accross the company
network, and i can use mysql administrator software sucessfully on any pc
without problems. In short, everying great working fine.

We also have an internet webserver. Same setup, windows 2003/iis6, same php
and mysql versions, in fact everything is indecital even the mysql user
setup. only difference between two servers is physical location, ip address
and some ntfs permissions. I can connect to the server fine from anywhere
using mysql administrator, and the php site runs fine but nothing using
mysql works either when running the site on the server itself using
//localhost/index.php or accessing it remotly over the internet using
ip.add.re.ss/index.php. Other stuff works fine on the intenet webserver, its
just accessing mysql through php.

The only difference i can see is the ntfs permissions, but I have made
changes to them without success and other stuff on the sever does work fine.

Any advice/suggestions would be greatly appreciated.

Cheers
Sheldon
Jul 20 '05 #1
9 2497
Sheldon wrote:
using mysql administrator, and the php site runs fine but nothing using
mysql works either when running the site on the server itself using
//localhost/index.php or accessing it remotly over the internet using
ip.add.re.ss/index.php.


What php command doesn't work, and what is the error message?
Jul 20 '05 #2
"Aggro" <sp**********@yahoo.com> wrote in message
news:XX***************@read3.inet.fi...
Sheldon wrote:
using mysql administrator, and the php site runs fine but nothing using
mysql works either when running the site on the server itself using
//localhost/index.php or accessing it remotly over the internet using
ip.add.re.ss/index.php.


What php command doesn't work, and what is the error message?


I can't connect to the mysql database using the pconnect command. Although I
can connect to the database using mysql administrator.

I think it may be either a compatibility issue with iis6 or a ntfs
permissions problem.

Mysql version is 4.0.20a, and php version is 4.3.7
Jul 20 '05 #3
Sheldon wrote:
I can't connect to the mysql database using the pconnect command. Although I
can connect to the database using mysql administrator.


AFAIK there is no pconnect() function in php. There is mysql_pconnect(),
perhaps you mean that? But you didn't tell what the error message is
that you are receiving, or are you even checking the error message? Do
you know how to see it?
Jul 20 '05 #4
"Aggro" <sp**********@yahoo.com> wrote in message
news:Wt***************@read3.inet.fi...
Sheldon wrote:
I can't connect to the mysql database using the pconnect command. Although I can connect to the database using mysql administrator.


AFAIK there is no pconnect() function in php. There is mysql_pconnect(),
perhaps you mean that? But you didn't tell what the error message is
that you are receiving, or are you even checking the error message? Do
you know how to see it?


Perhaps my original post wasn't clear or was too complicated for you.

Server 1: Win2000/IIS5 - Everything works fine
Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
Both servers have identical PHP/MySQL setups.

This is NOT a coding issue since the code works fine on the W2K server. It
looks like a problem with either IIS6 or NTFS permissions since the default
NTFS permissions on Win2003 are stricter than Win2000.

Anyone else expericed similar problem on WIN2003 with MySQL?
Jul 20 '05 #5
IIS6 on Win2003 has a very different setup compared to IIS5 in Windows 2000.
See the site http://s92192454.onlinehome.us./PHP_...under_IIS.html
for more details about configuring PHP and MySQL for IIS6...

Hope this site contains a solution for you...

Marc

"Sheldon" <sh***************@yahoo.co.uk> schreef in bericht
news:RC5yc.128$ec4.60@newsfe5-win...
"Aggro" <sp**********@yahoo.com> wrote in message
news:Wt***************@read3.inet.fi...
Sheldon wrote:
I can't connect to the mysql database using the pconnect command. Although I can connect to the database using mysql administrator.
AFAIK there is no pconnect() function in php. There is mysql_pconnect(),
perhaps you mean that? But you didn't tell what the error message is
that you are receiving, or are you even checking the error message? Do
you know how to see it?


Perhaps my original post wasn't clear or was too complicated for you.

Server 1: Win2000/IIS5 - Everything works fine
Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
Both servers have identical PHP/MySQL setups.

This is NOT a coding issue since the code works fine on the W2K server.

It looks like a problem with either IIS6 or NTFS permissions since the default NTFS permissions on Win2003 are stricter than Win2000.

Anyone else expericed similar problem on WIN2003 with MySQL?

Jul 20 '05 #6
Sheldon wrote:
Perhaps my original post wasn't clear or was too complicated for you.

Server 1: Win2000/IIS5 - Everything works fine
Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
Both servers have identical PHP/MySQL setups.

This is NOT a coding issue since the code works fine on the W2K server.


Example 1:
- Sir could you tell me what does the error message say?
- Of course, the error message says xxx xxx
- Okay, the problem is xxx and the solution would be to xxx

Example 2:
- Sir could you tell me what does the error message say?
- No way, didn't you understand, this doesn't work!
- I can't help you if you don't tell me error message.
- Are you stupid? I said that this doesn't work.
- The error message might provide important information about why the
connection fails. Getting error message doesn't mean that you must have
an error in your php code, it can also mean that php doesn't fail the
server socket, or there is problem with privileges or even that there is
not enough memory to commit the action. That's why reading and
understanding the error message helps a lot more rather than using a
crystal ball and trying to guess what might be wrong.
- [ to be continued ]

I might not be able to help even if I see the error message, but without
it, I'm sure that I won't be able to help. I hope that you know what I
mean with the error message?

For example you might have code that looks a little like this:
----------------------------------
<?
$link = mysql_connect("localhost", "username", "password")
or die("Could not connect");
....
----------------------------------

And if you go to web page, you would get error message that looks like this:
----------------------------------
Warning: mysql_connect(): Access denied for user: 'username@localhost'
(Using password: YES) in /home/php/database.ph on line 2
Could not connect
----------------------------------

Now, in this case, I would instantly see that there is no user called
"username" with given password, in database. So problem would be with
privileges. Then I could easily tell how to fix the problem, by using
grant-command to add privileges.

If you fail to connect to the database, you should get somekind of error
message that helps locating the problem.
Jul 20 '05 #7
"Aggro" <sp**********@yahoo.com> wrote in message
news:7Q************@read3.inet.fi...
Sheldon wrote:

Server 1: Win2000/IIS5 - Everything works fine
Server 2: Win2003/IIS6 - Connecting to MySQL through PHP doesn't work
Both servers have identical PHP/MySQL setups.


The error I get when trying to use the mysql_pconnect() function is:

Warning: mysql_pconnect(): Can't create TCP/IP socket (10041)

Again, all code and mysql/php settings/versions are the same. Tested it
using php.exe through the command line and the output was ok. So that
narrows things down a bit.
Jul 20 '05 #8
Sheldon wrote:
The error I get when trying to use the mysql_pconnect() function is:

Warning: mysql_pconnect(): Can't create TCP/IP socket (10041)


-----------------------------
WSAEPROTOTYPE (10041)
Protocol wrong type for socket.
A protocol was specified in the socket function call that does not
support the semantics of the socket type requested. For example, the
ARPA Internet UDP protocol cannot be specified with a socket type of
SOCK_STREAM.
-----------------------------

That error message looks very strange. I think it could even be a bug in
php or php is just not fully supported by iis6 or iis6 is not supported
by php. I'm pretty sure it has nothing to do with the MySQL server
anyway, because it seems to fail to create the socket, so connection to
database is not even attempted to be created.

You could ask this question in some php related newsgroup by attaching
the error message + the error explanation in this message. Perhaps they
could tell whether that is the problem with the php or with the iis server.

Good luck
Jul 20 '05 #9
"Aggro" <sp**********@yahoo.com> wrote in message
news:YG***************@read3.inet.fi...
Sheldon wrote:
The error I get when trying to use the mysql_pconnect() function is:

Warning: mysql_pconnect(): Can't create TCP/IP socket (10041)
-----------------------------
WSAEPROTOTYPE (10041)
Protocol wrong type for socket.
A protocol was specified in the socket function call that does not
support the semantics of the socket type requested. For example, the
ARPA Internet UDP protocol cannot be specified with a socket type of
SOCK_STREAM.
-----------------------------

That error message looks very strange. I think it could even be a bug in
php or php is just not fully supported by iis6 or iis6 is not supported
by php. I'm pretty sure it has nothing to do with the MySQL server
anyway, because it seems to fail to create the socket, so connection to
database is not even attempted to be created.

You could ask this question in some php related newsgroup by attaching
the error message + the error explanation in this message. Perhaps they
could tell whether that is the problem with the php or with the iis

server.
Good luck


Thanks very much for your help. I'll give your suggestions a try and also
try an earlier version of PHP.
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JL | last post by:
Platform: Linux Red Hat RHEL 3 (and red hat 9) Installed MySQL from source. As a matter of fact, installed all LAMPS from source, and the mysql socket file was arranged in a place other than...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
3
by: Kirk Soodhalter | last post by:
Hi, This started as a phpmyadmin problem, but has somehow morphed into a mysql problem. I don't know how to fix it. I am posting the conversation from a php newsgroup since it started there. ...
0
by: Plymouth Acclaim | last post by:
Hi guys, We have a problem with Dual AMD64 Opteron/MySQL 4.0.18/Mandrake 10 for a very high volume site. We are evaluating the performance on our new server AMD64 and it seems it's slow compared...
1
by: Alex Hunsley | last post by:
I am trying to install the DBD::mysql perl module. However, it claims I need mysql.h: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /home/alex/.cpan/Metadata Database was...
1
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
10
by: Caffeneide | last post by:
I'm using a php script which performs three xml queries to other three servers to retrieve a set of ids and after I do a query to mysql of the kind SELECT * FROM table WHERE id IN ('set of ids');...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.