Home > Database > Mysql Tutorial > GoLang 连接 Mysql 数据库

GoLang 连接 Mysql 数据库

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:18:10
Original
1221 people have browsed it

搜索下 找到一个 golang 的库地址: ? http://go-lang.cat-v.org/library-bindings ? 有数据库。。gui 等。 ? 发现就这个更新 时间最近。。下载 zip包。 ? https://github.com/Philio/GoMySQL ? 经过编译发现只可以再 linux 下面进行编译。windows 没有弄好

搜索下 找到一个 golang 的库地址:

?

http://go-lang.cat-v.org/library-bindings

?

有数据库。。gui 等。

?

发现就这个更新 时间最近。。下载 zip包。

?

https://github.com/Philio/GoMySQL

?

经过编译发现只可以再 linux 下面进行编译。windows 没有弄好。

?

首先在 linux 下面设置环境变量:

?

?

export PATH=$PATH:/opt/google/go/bin
export GOROOT=/opt/google/go
Copy after login

?然后 解压缩

?

?

Clone the git repository:

git clone git://github.com/Philio/GoMySQL.git

Build / install:

cd GoMySQL
make
make install

This installs the package as 'mysql' so can be imported as so:

import "mysql"

?

?


GoLang 连接 Mysql 数据库

?

如果编译没有报错误。就说明已经编译通过了。可以使用mysql 的包了。

?

?

使用 mysql 数据库连接 还要研究下。

?

go 语言视频。

?

中文:

?

http://v.youku.com/v_show/id_XMTY4Mzk5NTc2.html

?

英文:

?

http://v.youku.com/v_show/id_XMTMxMzIwMTQ4.html

?

?

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
How to choose golang web mvc framework
From 1970-01-01 08:00:00
0
0
0
Is it necessary to use nginx when using golang?
From 1970-01-01 08:00:00
0
0
0
golang - vim plug-in to write go
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template