首页 \ 问答 \ mysql有中文版的吗?

mysql有中文版的吗?

我在网上找一圈都没找到MYSQL的中文版的。可以在哪下载到中文版的?
更新时间:2023-01-17 13:01

最满意答案

呵呵,这简单,把jar放到classpath里,就是当你用MyEclipse建一个web工程时,放在webapps下的WebRoot的WEB-INF/lib就可以了,就相当于引用到classpath里,就可以用MyEclipse写代码了,一般都是写一个DB类,以后就可以重复使用这个类了。你可以上网找一些视频来看看,尚学堂讲的视频不错,都是基础的 

给你一个例子:
import java.sql.*;

public class DB {
 public static Connection getConn() {
 Connection conn = null;
 try {
 Class.forName("com.mysql.jdbc.Driver");
 conn = DriverManager.getConnection("jdbc:mysql://localhost/test?user=root&password=root");
 } catch (ClassNotFoundException e) {
 e.printStackTrace();
 } catch (SQLException e) {
 e.printStackTrace();
 }

 return conn;
 }

 public static PreparedStatement prepare(Connection conn, String sql) {
 PreparedStatement pstmt = null; 
 try {
 if(conn != null) {
 pstmt = conn.prepareStatement(sql);
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 return pstmt;
 }

 public static PreparedStatement prepare(Connection conn, String sql, int autoGenereatedKeys) {
 PreparedStatement pstmt = null; 
 try {
 if(conn != null) {
 pstmt = conn.prepareStatement(sql, autoGenereatedKeys);
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 return pstmt;
 }

 public static Statement getStatement(Connection conn) {
 Statement stmt = null; 
 try {
 if(conn != null) {
 stmt = conn.createStatement();
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 return stmt;
 }

 /*
 public static ResultSet getResultSet(Connection conn, String sql) {
 Statement stmt = getStatement(conn);
 ResultSet rs = getResultSet(stmt, sql);
 close(stmt);
 return rs;
 }
 */

 public static ResultSet getResultSet(Statement stmt, String sql) {
 ResultSet rs = null;
 try {
 if(stmt != null) {
 rs = stmt.executeQuery(sql);
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 return rs;
 }

 public static void executeUpdate(Statement stmt, String sql) {
 try {
 if(stmt != null) {
 stmt.executeUpdate(sql);
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 }

 public static void close(Connection conn) {
 try {
 if(conn != null) {
 conn.close();
 conn = null;
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 }

 public static void close(Statement stmt) {
 try {
 if(stmt != null) {
 stmt.close();
 stmt = null;
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 }

 public static void close(ResultSet rs) {
 try {
 if(rs != null) {
 rs.close();
 rs = null;
 }
 } catch (SQLException e) {
 e.printStackTrace();
 }
 }

 public static void main(String[]args) throws SQLException {
 Statement stmt = getStatement(getConn());
 String sql = "select * from user";
 ResultSet rs = getResultSet(stmt,sql);
 while(rs!=null&&rs.next()) {
 System.out.println(rs.getString(2));
 }
 }
}

相关问答

更多
  • 没有所谓好坏,要看你的应用和预算是什么。 SQL Server不是免费的,mysql是免费的。 sql Server上手容易,UI界面友好。 性能上数据量不大的话,sql server足够了,mysql可以安装在类Unix系统上,比如linux。
  • 呵呵,这简单,把jar放到classpath里,就是当你用MyEclipse建一个web工程时,放在webapps下的WebRoot的WEB-INF/lib就可以了,就相当于引用到classpath里,就可以用MyEclipse写代码了,一般都是写一个DB类,以后就可以重复使用这个类了。你可以上网找一些视频来看看,尚学堂讲的视频不错,都是基础的 给你一个例子: import java.sql.*; public class DB { public static Connection getConn() { ...
  • 要看你的发展方向 如果你想搞数据库方面的研究和深入学习 不建议你学郝斌的sql server 2005教程 多看 萨师煊 王珊的数据 如果只是做开发用到 关系型数据库 或者只做数据库入门可以看看郝斌的 sql server视频 一个是深层次的研究 一个是入门应用 理论指导实践
  • 首先放入SQL 2000 光碟片,這時光碟上的自動執行程式會自動起動安裝精靈,畫面如下圖所示。 如果您的光碟不會自動起動安裝精靈,您可以執行光碟上的SETUP.EXE來起動安裝精靈。   在畫面上有五個安裝選項,讓我們選擇要安裝的軟體。因此在這我們單擊『SQL Server2000的元件(C)』項目。 這時候出現的畫面如下,因為現在我們是要在系統上架設SQL Server資料庫伺服器,因此在下面的畫面單擊『安裝資料庫伺服器』項目。 這時候畫面上會顯示一『歡迎』視窗,按『下一步』按鈕,切換至下一個設定畫面。 ...
  • 要将sql server数据库中的数据全部导入到mysql数据库中,其方法有多种,利用mysql ODBC把SQL Server中数据库中的数据导入到MySQL中 第一步:安装mysql ODBC; 去相关的网站下载mysql ODBC进行安装。 第二步:建立MySQL的DSN; 在控制面板——>管理工具——>数据源 (ODBC)中建立MySQL的DSN。 例如: Data Source Name: MySQL DSN Server: localhost User: root Password: root ...
  • 您应该与您的主机交谈,看看他们建议进行完整备份,同时您可以使用导入/导出数据将数据传输到本地数据库。 编辑:搜索此问题后,我发现以下文章: 在我的机器上自动在具有SQL Server 2005 Express的共享主机上备份数据库? Plz指南 You should talk to your hosting and see what they recommend to make full backup, meanwhile you can use Import/Export Data to transfer ...
  • 检查约束无法访问列的先前值。 您需要使用触发器。 这种触发器的一个例子是 CREATE TRIGGER DisallowPriceDecrease ON Products AFTER UPDATE AS IF NOT UPDATE(price) RETURN IF EXISTS(SELECT * FROM inserted i JOIN deleted d ON i.primarykey = d.primary ...
  • 你可以使用sqlcmd http://msdn.microsoft.com/en-us/library/ms162773.aspx 然后将其放在批处理文件中并通过Windows调度程序进行调度 以下示例 sqlcmd -E -S localhost -q "select count(1) from databasename.dbo.tablename" 这将连接到本地计算机上的sql并在数据库中的表上执行rowcount you can use sqlcmd http://msdn.microsoft.c ...
  • SQL Server 2000管理工具包括企业管理器(如Management Studio),查询分析器(一种执行脚本的工具)和Profiler(一种分析查询的工具)。 你可以在SQL Server 2000中连接和使用SQL Management Studio 2005) 或者如果你想要不同的东西,你可以使用EMS SQL管理器 。 SQL Server 2000 Management Tools includes Enterprise Manager (like Management Studio), ...
  • 它是一个“独立的SQL Server”,Visual Studio只是为您安装它。 它与您从Microsoft.com获得的SQL Express安装没有区别。 您将要启动SQL Express Management Studio。 它应该位于开始菜单中的“Microsoft SQL Server 2005”下。 连接到SQLEXPRESS实例; 连接后,在“对象资源管理器”下,右键单击服务器本身,单击属性,然后单击安全性。 使用混合模式不是最好的安全实践,因为它需要在某处的连接字符串中存储用户名和密码。 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。