MySQL入门

1.常用的MySQL界面工具

Navicat,MySQL-Front,MySQL Workbench(官方),mysql(命令行),phpmyadmin(web版,需要XAMPP)

2.启动/关闭MySQL服务命令

net start mysql56

net stop mysql56

3.MySQL实现远程连接(改表法)

use mysql;

update user set host = ‘%‘ where user = ‘root‘;

flush privileges;­(mysql 新设置用户或更改密码后需用flush privileges刷新MySQL的系统权限相关表,否则会出现拒绝访问)

4.连接到MySQL

mysql -h 127.0.0.1 -u root -p root

5.C#连接MySQL

using System.Data;

using MySql.Data.MySqlClient;

 

MySqlConnection conn = new MySqlConnection("server=localhost;user id=root;password=root;database=world");
conn.Open();
MySqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "select * from city";

 

MySQL入门,布布扣,bubuko.com

MySQL入门

上一篇:hbase shell 基本操作命令


下一篇:Oracle,第五周