Jump to content


Photo

Problem running MySQL


  • Please log in to reply
7 replies to this topic

#1 whmeeske

whmeeske
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 November 2003 - 12:17 PM

I\'m running Apache2 and PHP4 on a Windows 2000 PC. This configuration works quite well, I can run php testscripts.

So far so good.

Now I want to use MySQL on this system and there appears a problem I can\'t solve. I installed MySQL 4.0.16 and that appears to be OK.
But if I give a command in the cmd-shell (for example \'mysqlshow\') or if I try to start phpMyAdmin in IE (http://localhost/phpmyadmin) I get the following error:
#2003 - Can\'t connect to MySQL server on \'localhost\' (10061)

When I start winmysqladmin I get a green traffic-light, so it seems that the MySQL-service runs OK. But on the environment-tab there\'s no server-info displayed, neither on the server-tab.

I don\'t understand this. I re-installed the whole package again, but that wasn\'t the solution.

I get a headache of this matter an it drives me a little crazy.

Is there anyone around who has the same experience and has (hopefully) a solution?

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 10 November 2003 - 12:29 PM

Goto

ControlPanel>Administrative Tool>services

Click on the Process named mysql.

In the Genreal TAB

PATH_TO BE EXECUTED

c:mysqlbinmysqld-nt

enusre that its pointing to the correct path.

If its correct enusre that mysql service is running.
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 whmeeske

whmeeske
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 November 2003 - 12:32 PM

ControlPanel>Administrative Tool>services
Click on the Process named mysql.
In the Genreal TAB
PATH_TO BE EXECUTED
c:mysqlbinmysqld-nt
ensure that its pointing to the correct path.
If its correct ensure that mysql service is running.


The path is correct and the service is running without any errors...

#4 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 10 November 2003 - 12:48 PM

Ok try this

Go to command prompt and try this

C:>cd mysqlbin

C:mysqlbin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1 to server version: 4.1.0-alpha-max-nt

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

mysql>


If you have set a password then you need to use the ysntax like this

mysql -u root -p
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#5 whmeeske

whmeeske
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 November 2003 - 12:54 PM

Go to command prompt and try this

C:>cd mysqlbin
C:mysqlbin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1 to server version: 4.1.0-alpha-max-nt
Type \'help;\' or \'h\' for help. Type \'c\' to clear the buffer.
mysql>


If you have set a password then you need to use the ysntax like this
mysql -u root -p


I also tried this command, but I get the same error:
#2003 - Can\'t connect to MySQL server on \'localhost\' (10061)

I really don\'t know how to solve this problem, I\'m almost in a mood to re-install w2k...but I don\'t know if thats a solution...

#6 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 10 November 2003 - 01:30 PM

Run these commands in the command prompt

c:mysqlbinmysqladmin -u root shutdown

c:mysqlbinmysqld-nt --remove

c:mysqlbinmysqld-nt --install

Once this is done go to the service and check if your mysql service is started and if not start it and try to connect .
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#7 whmeeske

whmeeske
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 11 November 2003 - 11:28 AM

Run these commands in the command prompt
c:mysqlbinmysqladmin -u root shutdown
c:mysqlbinmysqld-nt --remove
c:mysqlbinmysqld-nt --install
Once this is done go to the service and check if your mysql service is started and if not start it and try to connect .

I tried all this (and the items above) on another PC with w2k and there it works without any errors.
So it seems that there\'s somewhere a problem on my own w2k PC, but I don\'t know how to find it...

#8 whmeeske

whmeeske
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 13 November 2003 - 08:07 AM

I reinstalled Windows 2000 on the partition I use for my experiments. Then I reinstalled step-by-step Apache2, PHP4, MySQL4 and phpMyAdmin.

I\'ve tested it heavily and now it seems to keep working. Now I have a platform to learn more about PHP and MySQL.

Thanx for the help :wink:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users