两亩三分地

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  17 随笔 :: 20 文章 :: 2 评论 :: 0 Trackbacks

#

昨晚中刀了,系统不得不重装,好在Netbeans啊,MySQL, Tomcat之类的东西装在其他盘符,所以损失不大。

一早重灌系统后,试试Netbeans。Tomcat启动正常,MySQL倒是有点问题。
Services - Databases - Register MySQL database
因为MySQL安装目录什么都没有改变,所以MySQL Server Properties 安照之前配置;
但是配置完毕后MySQL Server at localhost:3306 显示not connected。
想想大概是重装系统后,没有添加服务的关系,于是在系统里添加路径,
然后在Start- command -cmd Dos窗口里直接输入
mysqld-nt --install MySQL50 --defaults-file="I:\Program Files\MySQL\MySQL Server 5.0\my.ini" (MySQL安装在I:\Program Files\MySQL\MySQL Server 5.0\)
提示Service installed。但是运行service提示:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
开始考虑到是不是防火墙关系,关闭防火墙问题依旧,并发现同样使用localhost的Java DB运行ok,
想来不是localhost的问题,检查services 发现MySQL50的服务并没有运行,再看MySQL服务属性
Path to executable的设置上,mysqld-nt的位置被设置在C:\了,问题就在这里,原来服务装错了。

发现问题了,可是如何删除(修改)服务又成了新问题,在dos窗口想用mysql-nt -remove来删除服务,提示服务没有安装。
最后只能直接在注册表里修改的方法:
Start - command - regedit
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services、MySQL50
ImagePath 将错误的路径改成 
"I:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt"--defaults-file="I:\Program Files\MySQL\MySQL Server 5.0\my.ini"
 MySQL50
完了,服务里启动MySQL50 服务,Netbeans里MySQL连接测试ok!

总结: 所谓的ERROR 2003: Can't connect to MySQL server on 'localhost' (10061) 估计应该是MySQL服务没有正常运行造成的,
所以只要重新正确启动MySQL服务,问题就迎刃而解了!
posted @ 2008-08-30 14:02 Chucky 阅读(11516) | 评论 (0)编辑 收藏

I have been using Netbeans to write code, draw UML for one and half years. During the period, I can see the functions it provides are getting more and more powerful and the servers and frameworks it supports also become more and more.Rightnow I started to learn framework, since there are much tutorials about using frameworks to develop Web & J2EE applications. I decided to use Netbeans as IDE to learn frameworks. So the first thing I should face to is to install database and server.

I don't need to spend time on introducing Netbeans. Of course, comparing to Eclipse, Netbeans still has lots spaces need to improve. But to me, Netbeans is no doubted a good and powerful tool for me. The latest version is 6.5 beta, but I think 6.1 Final is enough for studying purpose.


To MySQL, there is a MySQL GlassFish Bundle Netbeans  on the web. Certainly, we can manually install MySQL community edition.  There is a windows installation pack and zip pack, and we can google many articles about how to install MySQL, normally about how to add MySQL to windows Services.  MySQL GUI Tools is also necessary. About MySQL Java Connector, it is essential as well. But I think Netbeans provides MySQL JDBC Driver - mysql-connector-java-5.1.5-bin.jar already.

If choose to install MySQL GlassFish Bundle edition,, we don't need to configure any more but to setup MySQL GUI Tools, as following figure. If manually install MySQL, we need to setup the path of start command and stop command which also can reference to following figure.

mysql configuration

Comparing to install MySQL, I think Tomcat is much easier to install.  The  full pack or Web & Java EE Pack Netbeans 6.1 Final edition already had bundled Tomcat 6.0.16。Manual installation is not hard either, and the latest version is Tomcat 6.x . The thing we should notice is that we have better not to install windows installation pack, since the pack missed some batch files. During the configuring server in Netbeans, there would be some warning display. I suggest downloading the zip pack to install. 

Step by step for configuring server.

Select Services - Servers - Add Server..  In Add Server Instance window, choose Tomcat 6.0, and  give the name for server then press Next button


Installation and Login Details dialog window, in Catalina Home field, specify the path of Tomcat and setup user and password. After that, press Finish button to finish the configuration.


select Tomcat Server, right-click Start, the information displayed in output window shows the server start successfully.


Alright, everything is done! How easy it is! Then let's start coding!
posted @ 2008-08-28 21:40 Chucky 阅读(597) | 评论 (0)编辑 收藏

用Netbeans已经一年半了吧,反正一直没办法习惯用Eclipse。 这netbeans一直在不停的开发,功能也越来越强大;对不同server 和framework的支持也越来越好。 因为开始学习framework的关系,因为netbeans社区有不少相关的tutorials,所以还是决定用netbeans作为学习用的IDE,自然一上来就是安装数据库和Server。大概是Netbeans的普及程度远不及Eclipse,或者是Netbeans整合的太好了,相对配置实在太简单了,所以相对Eclipse,和Netbeans相关的配置文章实在太少了。

Netbeans目前最新版本是6.5beta,一般开发的话6.1 Final很好用了~

MySQL的话,Netbeans提供了MySQL GlassFish Bundle的版本,当然也可以自己安装,Windows安装版的话很好用,zip手动安装包的话,google上面相关的文章不少,无非就是将 MySQL添加到windows的服务中去。MySQL GUI Tools也是不可以少的。嗯MySQL Java Connector的话,也是需要的。Netbeans里好像已经有这个MySQL JDBC Driver - mysql-connector-java-5.1.5- bin.jar这个lib了。
如果安装,配置什么基本没有什么, 只是在最后要配置一下 MySQL GUI Tools,如图;手动安装MySQL的话,MySQL启动和停止的命令也可以是按照这个配置。
mysql configuration

相对MySQL,感觉Tomcat还是很好安装的,首先6.1 Final的完全包和Web &  Java EE Pack中已经直接绑定了 Tomcat 6.0.16了。当然手动安装也是可以的,最新版本Tomcat 6.x 。值得注意的是,在下载的时候建议不要选择windows安装版本。因为windows安装版本缺少几个batch file,在配置 netbeans的时候会被warning的,本着尽量省心省力的原则,多一事不如少一事。

选中Services - Servers - Add Server..  在Add Server Instance 对话框中 选择Tomcat 6.0后,填写Server的名字,按 Next


Installation and Login Details 对话框, Catalina Home 指定Tomcat的安装目录,Login Details设置用户及密码。按Finish完成配置。

选中Tomcat Server,右键start; Output windows 显示Server Start 正常!

好了,Server和MySQL已经搞定了,后面就是framework的学习了~
posted @ 2008-08-28 16:09 Chucky 阅读(417) | 评论 (0)编辑 收藏

仅列出标题
共4页: 上一页 1 2 3 4