Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

winxp mysql install 1

Status
Not open for further replies.

theEclipse

Programmer
Dec 27, 1999
1,190
US
I know you probably get millions of these posts, but I cannot for the life of me figure out how to get my mysql server to be accessible.

I have followed numerous tutorials and I can get mysql to run as a service, and I can get the odbc test to work just fine but no other software can connect. It just says unable to connect. I know that the service is running and installed because "net start" lists mysql. I have apache installed (apache2) and I have the latest version of mysql (downloaded today. but its not the beta.)

in the winmysqladmin window, the main tab is enviroment and the section on server (from what I can tell) is supposed to give you stats on the mysql server. problem is, these are all blank.

All help is appreciated.

Robert



Robert Carpenter
/b{2}|!b{2}/ - that is the question...
robert@convertingchaos.com
 
By default there should be one user defined which is "root". The user root can login from "localhost" without a password (you should change this). You will need to add a user and give that user privileges. To login as root type the following at the command line:

mysql -u root (no password needed)

You will get the welcome screen and prompt:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 173 to server version: 3.23.58

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

I will put each section on a different line but mysql will not do anything until it comes to the semicolon:

mysql> grant all
--> on *
--> to joe identified by 'secret'
--> with grant option;

This will create an administrator with ALL privileges on ALL databases and has the ability to grant privileges to other users. His username is joe and password is secret. To exit the mysql monitor, type "quit".





 
RhythmAce-

Thanks for the prompt reply. That no workie tho. here is a paste of my dos session:
Code:
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\ROBERT~1>cd
C:\>cd mysql\bin

C:\MYSQL\BIN>mysql -u root
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

C:\MYSQL\BIN>

this is the same error that mysqlcontrol center gives, and so does mysql-front.

could this be some sort of software conflict with apache2? Or what if another program is using the port? Is that even possible?

Robert Carpenter
/b{2}|!b{2}/ - that is the question...
robert@convertingchaos.com
 
Ok, let's go back to the begining and check a few things. There should be a file called my.ini in your main Windows directory. Open it and check that the paths are correct in the [mysqld} section. When you installed MySQL it should have created two databases automatically, "test" and "mysql". If /mysql/bin is not in your system's path, change to that directory. Type "mysqlshow". It should list the two databases. Now type "mysqladmin version status proc". This should give you the complete status of mysql. If this doesn't do anything, mysql may be braindead so we'll look for a heartbeat. Try to telnet into the mysq server:

telnet localhost 3306

If it is alive, you should get something like this:

Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
(
3.23.58?w%O=$=C{,Connection closed by foreign host.

The 3.23.58 is the release number of mysql. This means the mysql server answered so it is running. If the connection fails, then mysql is not running. Now we will try to connect to mysqladmin using differnt ways. Here are a few to try:

mysqladmin --port=3306 version
mysqladmin -h localhost version
mysqladmin -h 127.0.0.1 version
mysqladmin -h 192.168.0.10 version (the ip associated with eth0)
mysqladmin -h machinename version

Anyway, you get the idea. You may also have to try both anonymous user and root along with these. If this leeds nowhere, comeback and we may have to go into debug mode.
 
Okay.

So the mysqladmin and the mysqlshow commands didnt work. cant connect. same problem with the telnet attempt.

the service appears to be running, but not listening on the right port or something. Not sure about that one.

Here is the my.ini file that mysql uses:
Code:
[mysqld]
basedir=C:/mysql
bind-address=localhost
datadir=C:/mysql/data
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=rob
password=access

Could my problem be the winmysqladmin program that I am using to manage the server?

Robert Carpenter
/b{2}|!b{2}/ - that is the question...
robert@convertingchaos.com
 
You wouldn't happen to have a firewall enabled on the machine that is blocking port 3306 from everywhere would you?

----
JBR
 
what firewall software? surely someone here has dealt with it before.

----
JBR
 
well it is zonealarm pro. I went into the programs section to add mysql to the explicit allow list and it said that it couldnt add it because the program had explicit deny settings already. So I just reset the permissions on it. Dont know how it got on the list as a denied entry. oh well.

Robert Carpenter
/b{2}|!b{2}/ - that is the question...
robert@convertingchaos.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top