你要先运行 mysql\bin\ 里的mysqld-opt.exe 或mysqld-nt.exe
启动mysql服务先然后才能 D:\mysql\bin>mysql回车 连接本地。

解决方案 »

  1.   

    mysql install on windwos platform:By default mysql is configured to be installed in"c:\mysql".if you 
    want to install mysql in another disk install it in "c:\mysql"first,
    then move the installation to where you want it. if you move mysql
    you must indicate where everything is located by using a "--basedir"
    option when you start the server. ok let's make a example, if you 
    have moved the mysql program to "d:\programs\mysql" you must start 
    mysql like this:
     "c:\> d:\programs\mysql\bin\mysqld --basedir d:\programs\mysql
     by the way use "mysql --help" to display all options start mysql on windows (following is start at windows98)
     1.start the mysql server you should start an ms-dos window and type
      c:\mysql\bin\mysqld
     this will start "mysqld" in the background without a window
     2.you type like this:
     "c:\mysql\bin\mysql" mysql will start.
     3.you can stop the mysql server by running:
     c:\mysql\bin\mysqladmin -u root shutdown
     4.if mysqld doesn't start please check the"c:\mysql\date\mysql.err"starting on window NT or windows2000on NT/win2000 the server name is mysqld-nt.normally you should install mysql as service on NT/win2000 :
     "c:\mysql\bin\mysqld-nt --install".
    ok you can start and stop the mysql service with these commands:
    "c:\mysql\bin\net start mysql"
    "c:\mysql\bin\net stop mysql"
      

  2.   

    Windows 2000下安装PHP4及MySQL大揭密作者: chenlinhaime
      发表日期: 2000/08/03 11:54我的php4和mysql的软件包是php-4.0.1pl2-Win32.zip、mysql-3.23.19-beta-win.zip。  先安装mysql,用winzip8.0打开软件包进行完全安装,默认安装路径为:c:\mysql; 
      安装完成后,打开“开始”按钮中的“运行”,输入命令:C:\mysql\bin\mysqld-nt.exe --install,并执行;
      打开“开始”按钮下的“程序”=》“管理工具”=》“服务”,找到“mysql”服务,启动它;
      至此,mysql安装完成,重启win2000adanced server。您还可以打开C:\mysql\bin\winmysqladmin.exe,在第一次用它时,需要建立管理员名及密码,我分别设置为root和(yourpassword)。关闭它后,程序自动在状态行下建立一个“红绿灯”的小图标。   
      现在开始安装php4,将软件包先用winzip解压到c:\php4下,再将目录下的所有dll文件拷到c;\winnt\system32下,不要覆盖已有的dll文件;接着将目录下的php.exe和php.ini-dist两个文件拷到c:\winnt下; 
      将c:\winnt\php.ini-dist改名为php.ini,并打开它,找到;Windows Extensions,将extension=php_calendar.dll、extension=php_zlib.dll、extension=php_ldap.dll前的“;”去掉,关闭该文件。 
      打开“开始”按钮下的“程序”=》“管理工具”=》“internet服务管理器”,选中“默认web站点”,打开它的“属性”窗口。在“web站点”页下,改变“IP地址”:“全部未分配”为“(您机子的ip地址,例如:202.195.243.131)”;“TCP端口”为“80”。   
      接着,选中“主目录”页,单击“应用程序设置”下的“配置”按钮后,在新窗口下单击“添加”按钮;在“可执行文件”中输入“C:\WINNT\php.exe     %s %s”,在“扩展名”中输入“.php”,点击“确定”。
      接着,选中“ISAPI筛选器”页,单击“添加”按钮;在“筛选器名称”中输入“php”,在“可执行文件”中输入“C:\WINNT\system32\php4isapi.dll”,点击“确定”。 
      接着,选中“文档”页,单击“添加”按钮;在“默认文档名”中输入“index.php”,点击“确定”,并将其提高到最高级。您还可以添加常用的php文件名,如:“default.phtml”、“index.php3”等。 
      关闭所有窗口,重启系统后,可打开IE浏览器进行测试。
      

  3.   

    在ms-dos 方式下
    运行:
         net start mysql