macos sqlite_如何在macOS上安装SQLite

macos sqlite

I’m a Mac user and I do not own a Windows computer, so I can’t write the instructions for Windows. Google “how to install sqlite on windows” for specific instructions. Same goes for Linux.

我是Mac用户,并且没有Windows计算机,因此无法编写Windows的说明。 谷歌“如何在Windows上安装sqlite”以获取具体说明。 Linux也是如此。

On macOS, you don’t need to do anything to install sqlite. It’s preinstalled in all modern versions of macOS.

在macOS上,您无需执行任何操作即可安装sqlite。 它已预安装在所有最新版本的macOS中。

All you need to do is to open a terminal and run the

您需要做的就是打开一个终端并运行

sqlite3

command.

命令。

Press ctrl-C 2 times to exit the SQLite executable.

按ctrl-C 2次以退出SQLite可执行文件。

This is pretty cool!

太酷了!

My macOS with Mojave comes with SQLite 3.24, and the latest version (at the time of writing) is SQLite 3.30. You can upgrade SQLite using Homebrew, but for the sake of simplicity, I’m not going to cover this.

我的装有Mojave的macOS带有SQLite 3.24,而最新版本(在撰写本文时)是SQLite 3.30。 您可以使用Homebrew升级SQLite,但是为了简单起见,我将不介绍它。

A great software we can use to interact with a SQLite database is TablePlus. It comes with a free trial that’s perfect for our usage, because it’s not time-based but rather it limits the amount of concurrent connections you can make to the database.

TablePlus是我们可以用来与SQLite数据库进行交互的出色软件。 它带有一个免费试用版,非常适合我们的使用,因为它不是基于时间的,而是限制了您可以与数据库建立的并发连接的数量。

Download it from https://tableplus.com. I know there are macOS, Windows and Linux versions.

https://tableplus.com下载。 我知道有macOS,Windows和Linux版本。

You create a new connection, choosing SQLite:

创建一个新连接,选择SQLite:

You select a name, and type a database path. I choose test.db, in the /Users/flaviocopes/ folder:

您选择一个名称,然后键入数据库路径。 我在/Users/flaviocopes/文件夹中选择test.db

SQLite is pretty cool because the database is contained in a file, which you can put pretty much everywhere you want. This is radically different from PostgreSQL, and MySQL and other big DBMS.

SQLite非常酷,因为数据库包含在一个文件中,您可以将其放置在几乎任何地方。 这与PostgreSQL,MySQL和其他大型DBMS完全不同。

Pressing Connect, the connection was successfully created:

Connect ,连接已成功创建:

and I can see the file created in that folder, with zero KB of size:

我可以看到在该文件夹中创建的文件,大小为零KB:

That’s it.

而已。

I’m going to make more tutorials on how to use this SQLite database, soon.

我将很快就如何使用此SQLite数据库做更多教程。

翻译自: https://flaviocopes.com/sqlite-how-to-install/

macos sqlite

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值