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!

Complete newbie

Status
Not open for further replies.

JonoB

Programmer
May 29, 2003
147
GB
Hi,
I am a complete newbie at mysql and php, although i am trying to learn....

I installed php (which works 100%) and also installed mysql (version 4.0.13) using the autoinstaller for windows (im running winxp pro). This all worked 100% yesterday and i could run the mysql consol and issue commands to make tables, etc.

I then deleted a bunch of old websites off my pc, started a new one and ran mysql today. The winmysqladmin file runs fine, but i cannot run mysql.exe - i get the following error message everytime : "Error 2004:Cant create tcp/ip socket (10106)"

I have tried to delete mysql and the install files (I installed to c:\mysql), and reinstalling. I noticed that i did not have to put a username and password in when reinstalling, so I assume that the registry entries were maintained.

What is up here?

Thanks for the help.
 
If you re-install, it is normal behavior to reset root password to blank. So if you did not try to change something you can simply login without a password but specifying root user


mysql -u root (enter)

then run the GRANT command below.


If you have already tryed something else and it did not work do the following



c:\net stop mysql

Then to prevent mysql from reading previous settings

c:\net start mysql --skip-grant-tables


log in normally

After login, at mysql prompt


mysql>

GRANT ALL
ON *.*
TO root@'localhost'
IDENTIFIED BY "password"
WITH GRANT OPTION
;


logoff mysql and

stop the service and restart ot normally

net stop mysql

net start mysql


A tip:

When you uninstall mysql you must also manually remove the my.ini file in the windows directory.
However the username and password specified in my.ini are not to log in but just to start the service at windoz boot.


Bye

Qatqat



I have been happy throughout my life in thinking that samba was I kind of dance; now I live with Linux and all I do is working.
 
As suggested, I do the following:

c:\net stop mysql

Then to prevent mysql from reading previous settings

c:\net start mysql --skip-grant-tables

I then go to c:\mysql\bin and run mysql.exe, but I get the error message:

Error 2003:Cant connect to mysql server on 'localhost' (10061)

Thanks again for any help....
 
Try log in as root


mysql -u root (enter)


then set password woth the grant statement


Bye


Qatqat

I have been happy throughout my life in thinking that samba was I kind of dance; now I live with Linux and all I do is working.
 
Hi,

Tried logging in as root (mysql -u root), but it gives me the same error message again.

Damn, this is like DOS days - so user unfriendly.
 
If your server is trying to create a tcp socket perhaps you haven't set a hostname properly.


Read this


Bu tfrom the error you get 10106 your server may simply be stopped already.

Hav eyou installed it as a service in windoz XP after installing?


run from c:\mysql\bin

mysqld --install


then restart your computer.

Now you can control mysqld behavior from windoz service manager which you get by running

services.msc

at DOS prompt

By default it should be started automatically.

Bye

Qatqat



Life is what happens when you are making other plans.
 
QatQat - thanks for all your help - really appreciated.

I know I am not THAT dumb - I finally figured out that my firewall was preventing me connecting to my own server. Doh!

Once again, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top