By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,247 Members | 871 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,247 IT Pros & Developers. It's quick & easy.

PHP & mysql

P: n/a
Ken
First time I have installed mysql.

I have not been able to connect to the server/database with a new php
installation.

I have installed IIS. Do I need this for mysql?

The php works fine. I can run scripts,etc.

When I try mysql_connect ("localhost","mysql_user", mysql_password") or
die....

I get cannot connect to Mysql server on localhost(10061) ....

How do I locate the name or define the server name? ??localhost??
How do I define or locate the username for the server?
How do I locate the password or define the password?

Is there a program (control panel) in Windows 2000 Pro that will let me look
at the server name, info? To make sure the server is functioning properly?

Look at the database information, such as, database name, tables, etc.
without connecting through php?

Thanks for the help.


Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Ken" <kk******@wi.rr.com> wrote in message
news:Rj*******************@twister.rdc-kc.rr.com...
First time I have installed mysql.

I have not been able to connect to the server/database with a new php
installation.

I have installed IIS. Do I need this for mysql?
You need a webserver and IIS will work but you will probably be happier
installing Apache rather than IIS. You can download a WAMP such as
Apache2Triad from SourceForge and it will automatically install everything
you need and work fine after a reboot.

You should install the Windows Administratative Tools from your CD in order
to access the MySQL Service. From there, you can start and restart the MySQL
server as needed.
The php works fine. I can run scripts,etc.

When I try mysql_connect ("localhost","mysql_user", mysql_password") or
die....

I get cannot connect to Mysql server on localhost(10061) ....
It cannot connect to the MySQL database server on port 10061. This probably
means that the username and password you are using are incorrect. Also, in
your example above, you are missing a double quote.
How do I locate the name or define the server name? ??localhost??
Localhost is ip adress 127.0.0.1 on your system. I don't believe you can
change the name. You can however assign a workgroup name to your machine and
use in instead of or in unison with 'localhost'.
How do I define or locate the username for the server?
How do I locate the password or define the password?
The default username for most MySQL installs is root with no password. To
assign a password to root, open a console window (run command.exe) and
change directories to the location of MySQL, then enter the following
commands.

mysqladmin -u root password <password>
mysqladmin -u root -h localhost password <password>

For both commands, replace <password> with whatever password you want to
assign.

To simplify things in the furture, you might want to get a copy of DBTools
Manager Professional (opensource) which mimics the operation of MSSQL
Manager. You can use it to create databases, view and edit data, create
users, etc. in a Windows friendly environment.

phpMyAdmin is a better tool for routine database management, but the above
comes in handy in many cases.
Is there a program (control panel) in Windows 2000 Pro that will let me look at the server name, info? To make sure the server is functioning properly? Select the System applet from Control Panel. However, you really need to
install the Administrative Tools mentioned above, especially if you are
using IIS.

Also note that you can use Apache and IIS on the same box, but need to
assign the two webservers to different ports. IIS installs on port 80. You
could probably install Apache on port 81.
Look at the database information, such as, database name, tables, etc.
without connecting through php?

Thanks for the help.

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.