Thursday, July 26, 2007

Problem after installing MYSQL on WIN32

You need to remember there are two parts to mysql, the server and theclient(s). Mysqld is the server, mysql is the command line client. Thetraffic light is courtesy of another program called winmysqladmin and isoptional.If you start mysqld from a command prompt, it will not return to thecommand prompt. Perhaps that is what you mean by "Windows's promptcrash..". This is quite correct, the server is now running and that isdetected by winmysqladmin, so the green light comes on.The best way to run mysqld is as a Windows service. The manual coversthis but you can run it from a command prompt or from Windows Startup ifyou want.Once the server is running you can start up a client to talk to it.You can start the command line client from a command prompt by enteringC:\mysql\bin\mysql -u -h -p The default user name is root, the default host is localhost and thereis no default for the database.For exampleC:\mysql\bin\mysql -uroot -p testLogs you in as root, will prompt for root's password (which is empty bydefault after installation) and will connect you to the test database. Iam assuming you have installed mysql to c:\mysql, if not adjust thepath. Just enteringC:\mysql\bin\mysqlWill log you into the server (if any) on your local machine as root(providing root has no password) but will not connect you to anydatabase. This is what happens if you just double click mysql.exe fromExplorer.You say you saw the one line help prompt, so you got that far.There is no SQL command "mysqlshow" so that won't work and many othercommands won't work unless you are connected to a database.You can connect to a database by enteringUSE test;and pressing enter. There is a database called "test" created duringinstallation. If you enterSHOW databases;You will see there is also a database called "mysql" where the serverkeeps its administrative information.Hope this gets you going but it is all in the manual in section 2.2.

0 comments: