本文共 2181 字,大约阅读时间需要 7 分钟。
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 . I know there are macOS, Windows and Linux versions.
从下载。 我知道有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数据库做更多教程。
翻译自:
macos sqlite
转载地址:http://smqgb.baihongyu.com/