Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and test MySQL5.6 on win7

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to install and test MySQL5.6 on win7", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn "how to install and test MySQL5.6 on win7".

Download address:

Http://dev.mysql.com/downloads/mysql/

Click in, and you can see the following interface. Although 32bit is displayed, it will automatically become 64-bit when clicked:

Installation is very simple, silly, I chose to install completely, the installation leaf is very fast, after the installation is completed, open MySQL Workbench 6.0CE.

Select connect to database and the interface is as follows:

After being connected, there is the following interface, and you can see that there are databases such as test,world by default.

If you boot next time and find that the mysql server is not open, you will not find the mysql service in the windows service.

So the solution is to run cmd with administrator privileges, change to the Bin directory of MYSQL, execute the mysqld.exe-install command, and you can see the mysql service in the windows service.

=

Let's write a simple C # link to MySQL to query the country table in world.

First of all, you need to download MySql.Data.dll. The code is as follows, which can be downloaded here.

Using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using MySql.Data.MySqlClient;namespace ConnectToMySQL {class Program {static string conString = "Server=localhost;Database=world;Uid=root;Pwd=passok;"; static void Main (string [] args) {MySqlConnection conn = new MySqlConnection (conString); MySqlCommand cmd = null Try {cmd = conn.CreateCommand (); cmd.CommandText = "select * from country"; MySqlDataAdapter adpter = new MySqlDataAdapter (cmd); DataSet ds = new DataSet (); adpter.Fill (ds) If (ds! = null & & ds.Tables.Count > 0) {DataTable dt = ds.Tables [0]; foreach (DataRow row in dt.Rows) {Console.WriteLine (row [0] + "," + row [1] + "," + row [2] + "," + row [3]) }} else {Console.WriteLine ("No data found");}} catch (Exception ee) {Console.WriteLine (ee.Message) The above is all the contents of the article "how to install and Test MySQL5.6 on win7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report