我如何(是否可以)在本地安装 mysql workbench?

发布于 2025-01-05 07:13:03 字数 113 浏览 2 评论 0原文

我想在我的 Linux 机器上本地安装 mysql 工作台二进制文件,因为我没有 sudo 权限。我在使用 --prefix 安装 python 时这样做了。这也可以用 mysql workbench 来完成吗?

I want to install a mysql workbench binary locally on my linux machine because I don't have sudo rights. I did this when I installed python using --prefix. Can this also be done with mysql workbench?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江湖正好 2025-01-12 07:13:03

是的,可以,只要您愿意从源代码编译 Workbench。不过,建议您需要 sudo 权限才能安装其编译依赖项。步骤如下:

  1. 官方下载网站。您应该下载标记为“Generic Linux(架构独立),压缩 TAR 存档”的版本。

  2. 解压缩下载的源文件。从 Linux 终端:

    $ tar -zxvf mysql-workbench-whatever.tar.gz

  3. 移动到 Workbench 源代码所在的目录:

    cd mysql-workbench-whatever

  4. 阅读 位于此目录中的 INSTALL 文件可查找编译 Workbench 所需安装的软件包。对于 Ubuntu,这是安装它们的命令:

    $ sudo apt-get install build-essential autoconf automake libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev libglu1-mesa-dev libgl1-mesa-glx mesa-common -dev libmysqlclient15-dev uuid-dev liblua5.1-dev libpixman-1-dev libpcre3-dev libgnome2-dev libgtk2.0-dev libpango1.0-dev libcairo2-dev python-dev libboost-dev

  5. 使用以下命令运行 autogen.sh您想要安装 Workbench 的位置的路径:

    $ ./autogen.sh --prefix=~/bin/wb52

    (编译后,上述命令将在您的主目录中的 bin/wb52 目录中获取工作台的二进制文件)。只需将目标目录更改为您喜欢的任何目录即可。

  6. 编译并安装MySQL Workbench:

    $ make install

    这将需要一些时间(可能需要半小时,具体取决于您的系统)。如果您有多个可用的 CPU 核心,您应该使用,例如:

    $ make -j3 install

    这将使用三个核心进行编译(将核心数量调整为您认为对系统合理的数量)。

  7. 编译后,您可以运行 Workbench 的可执行文件,该可执行文件将位于您在步骤 5 中设置的路径内的 bin 目录中。

祝您玩得开心!

Yes, you can, provided that you are willing to compile Workbench from sources. You are advised however that you'll need sudo rights to install its compilation dependencies. Here are the steps:

  1. Download Workbench's sources from the official download site. You should download the version tagged "Generic Linux (Architecture Independent), Compressed TAR Archive".

  2. Uncompress the downloaded source file. From the linux terminal:

    $ tar -zxvf mysql-workbench-whatever.tar.gz

  3. Move to the directory with Workbench's source code:

    cd mysql-workbench-whatever

  4. Read the INSTALL file located in this directory to find out the required packages that you would need to install in order to compile Workbench. For Ubuntu here's the command to install them:

    $ sudo apt-get install build-essential autoconf automake libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev libglu1-mesa-dev libgl1-mesa-glx mesa-common-dev libmysqlclient15-dev uuid-dev liblua5.1-dev libpixman-1-dev libpcre3-dev libgnome2-dev libgtk2.0-dev libpango1.0-dev libcairo2-dev python-dev libboost-dev

  5. Run autogen.sh with the path to where you want Workbench installed:

    $ ./autogen.sh --prefix=~/bin/wb52

    (The above command will get your Workbench's binaries in the directory bin/wb52 within your home directory once compiled). Just change the destination dir to whatever you like.

  6. Compile and install MySQL Workbench:

    $ make install

    This will take some time (maybe half an hour depending on your system). If you have more than one CPU core available you should use, for instance:

    $ make -j3 install

    and this will use three cores for compilation (adjust the number of cores to whatever you find reasonable for your system).

  7. Once compiled you can run Workbench's executable that will be located inside a bin directory within the path you set in step 5.

Have a lot of fun!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文