Page 1 of 1

I have no clue ..do you?

Posted: Mon Dec 29, 2003 12:45 pm
by crazytopu
hi i am getting a problem with my MySql server.

I unzip the MySql4.0.16 and put it in c:\mysql.

Run the setup.exe from c:\mysql

save the server in g:\mysql

then from command prompt i typed:

g:\cd mysql
g:\mysql\cd bin
g:\mysql\bin mysql.exe

but it gives me the following msg:

"ERROR 2003: "Cannot connect to MySql server on 'localhost' (10061)


This is not my first time with my this installation. every time i did the installation i followed the same procedures but i got the server up and running. What's wrong here then.

I have no clue..do you?

Posted: Wed Dec 31, 2003 8:56 am
by JAM
http://www.mysql.com/doc/en/Windows_pre ... nment.html

Perhaps you missed out editing the ini-file that holds the configuration data of the database?
...
For example, by default, the installer places MySQL in `C:\mysql' and the data directory in `C:\mysql\data'. If you want to use a data directory of `E:\mydata', you must do two things:

* Move the data directory from `C:\mysql\data' to `E:\mydata'.
* Use a --datadir option to specify the new data directory location each time you start the server.

When the MySQL server starts on Windows, it looks for options in two files: The `my.ini' file in the Windows directory, and the `C:\my.cnf' file. The Windows directory typically is named something like `C:\WINDOWS' or `C:\WinNT'. You can determine its exact location from the value of the WINDIR environment variable using the following command...
...

Posted: Wed Dec 31, 2003 10:10 pm
by crazytopu
Okay, i dont want to change the default location and want to keep it in c:\mysql as i did with my previous installation.

So, i uninstall mysql server that was installed in g:\mysql directory.

i went for a fresh installation this time. put the server in c:\mysql and the data directory in c\mysql\data. Still i m receiving the same error message.

From your note:

Perhaps you missed out editing the ini-file that holds the configuration data of the database?


Question: Are you talking about The `my.ini' file in the Windows directory?

Do i have to configure it before i run mysql.exe? But i never configured it before but still got my server working. Why do I have to do it this time you think? Do you think my installation files got corrupt? Should i download a fresh copy and try?

Posted: Thu Jan 01, 2004 1:12 am
by infolock
well, let me ask you a question. have you ran mysqld yet ??

when you isntall mysql, that is what you have to run first in order to get it to even load it..

what versoin of windows are you using?

you may want to instead do this :

go to the directory \mysql\docs

open the manual

go down to the section entitled :

2.1.1 Installing MySQL on Windows

follow it step by step and ensure you have covered them all.

sounds like you just didn't load it correctly. after you load it once though, shoudl work after that.

hope this helps.

Posted: Thu Jan 01, 2004 1:24 am
by JAM
Also try to run the winmysqladmin.exe file (located in the /bin/ directory) by doubleclicking it in windows.
That will run the appropiate server daemon (not just mysql.exe as you tried) and also display some information about the ini-file. (Yes, the my.ini one in either the windows, c-root or elsewhere...)

Posted: Thu Jan 01, 2004 3:29 am
by crazytopu
:lol:

Thank you people so much. Yes it worked when I double clicked on winmysqladmin.exe.

But why didn't i have to do it with my previous installation? Is this because that it is not needed everytime?

And infolock, about your question well, let me ask you a question. have you ran mysqld yet ?? - no i didnot run mysqld. But which is the normal procedure? is not it just to go to bin and execute mysql.exe?


Now my mysql is working well with my php under apche server.

yahoooooooooooooooooooooo

Posted: Thu Jan 01, 2004 3:43 am
by infolock
well, the installation manual ( which is what i go by ) says to run mysqld.

which is the correct method is a question i couldn't truthfully answer ;) but if what you did works for you, then it works for me :)

Posted: Thu Jan 01, 2004 4:10 am
by crazytopu
hi guys! you people have made life a lot simpler for newbies like me.

I have a question : When i creat a database and then create some table under it it gets saved automatically under mysql\bin\data directory. Like if i have a database named library and a table under library named book i can see it here :C:\mysql\data\library\

but if i save a query...i m using a GUI mood to creat it...where does it goes?

My query name is extract book .........where to find it ?

Posted: Thu Jan 01, 2004 4:59 pm
by JAM
Explain "Save a query".

The only I can think of is using a GUI to test/save queries, it's you yourself that chooses where to save the file. It can however not be used in php (usually).

If you are using a GUI to create sql-queries you should rather copy n' paste them into your php scripts and use them that way.

Posted: Thu Jan 01, 2004 5:34 pm
by Pyrite
If you use phpMyAdmin, you can save/bookmark your queries.

Posted: Fri Jan 02, 2004 9:17 am
by crazytopu
sorry JAM

I don’t know what happened to the Goddamn auto email notification system. It just did not inform about your reply. Sorry for being late. I just saw your post.

Hope the following explanation helps.

Before I reinstall my operating system I took a back up of my msql folder and all of its contents inside.

I did make the back up because with my previous installation I created a couple of tables using navicat (The GUI tool). I just did not want to create them again. So I kept a copy of all of my tables.

So after I did the fresh installaion I copy the database folder named library from the backup and just put it on my C:\mysql\data\ folder. It worked fine so far.

But I also created some queries also with my previous installation which I can see in my back up folder. But when I copy it to the new one exactly in the same place I don’t get any result.

In my back up I can see that one query named query1.sql is saved under:
mysql\bin\library (library is my database name).

So, I opened up mysql:\bin\ then created a folder named library and inside it paste the query1.sql that I copied from my backup.

But it is not working. I wanna know is there any other file that I need to copy? Where to look for them in my backup?

Posted: Fri Jan 02, 2004 10:03 am
by JAM
The tables you create in your database are all stored in the /data/ dir. (Example: c:\mysql\data\ ) So you got that working allright.

As I'm not familiar at all of how Navicat works, I can't help you on the queries.
In my back up I can see that one query named query1.sql is saved under:
mysql\bin\library (library is my database name).
This parts sounds odd. If library is your database name, shouldn't that be placed in the /data/ directory?

A real shot in the dark is the following...
Open up the query in notepad. Look in the text and see if you can spot some kind of path pointing the wrong direction in the file. Parhaps Navicat stores pathnames in the queryfiles, and that is what makes it break.

Posted: Fri Jan 02, 2004 10:08 am
by JAM
Suggestion1:
Also, if you manage to open the .sql files in notepad and find that the text is actually readable (but perhaps not understandable) you might be able to copy and paste that information into Navicat?

Suggestion2:
If you start Navicat, create a simple query, and save that, where does it get saved? Does it use the same directory for all queries? How it saves the files might give you some information on how to place the backup files also...

Still shooting in the dark...

Posted: Fri Jan 02, 2004 10:47 am
by crazytopu
this is the text inside query.sql. I used notepad to open it and all the codes seem crystal clear.

SELECT
FROM book
INNER JOIN issue ON (book.call_no = issue.call_no)
INNER JOIN member ON (issue.member_id = member.member_id)

and as u said i created a simple query to test. But navicat does not let you know where it is saving any files. so i had no idea where the file got saved.


I used search but didnot get any result. I am yet to find out where the test.sql has been saved up.



And u r right. it does seem very odd:


In my back up I can see that one query named query1.sql is saved under:
mysql\bin\library (library is my database name).

This parts sounds odd. If library is your database name, shouldn't that be placed in the /data/ directory

But amazing thing is though mysql put library folder in bin and save the query inside it, this time i dont see any such folder even though i created my test.sql query under my database named " test". I dont know what's wrong. I was actually expecting to see my test.sql under c:\mysql\bin\test\

Posted: Fri Jan 02, 2004 10:54 am
by JAM
Say you installed Navicat to:
C:\Program Files\MySQL Studio\

You queries are then saved to (default):
C:\Program Files\MySQL Studio\home\[tablename here]\

The \home\ dir might be created when you save your first query, if you cant see it. Check those directories.

But again, as you can see the code in clear text, you should be able to copy paste the bakups as last resort.