MySql便携式版本 [英] MySql portable version

查看:207
本文介绍了MySql便携式版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道可移植的mysql版本吗?

anyone know a portable version of mysql?

我了解xampp,但它与PHP和Apache一起提供

I know xampp but it comes with PHP and Apache together

有人知道如何隔离mysql吗?

anyone know how to isolate the mysql?

推荐答案

您可以下载MySQL Essentials版本,并对my.ini文件中的目录进行一些小的更改,以使用相对路径而不是绝对路径.然后,您可以直接运行服务器,而无需安装或使用Windows服务.

You can download the MySQL Essentials version and make a few small changes to directories in the my.ini file to use relative paths instead of absolute paths. Then you can run the server directly without having to install or use a Windows service.

  1. 下载一个MySQL .zip文件(而不是.msi,尽管您可以获取.msi并使用7Zip或Orca从中提取文件).

  1. Download a MySQL .zip file (instead of an .msi, though you could get the .msi and use 7Zip or Orca to extract the files from it).

提取文件.至少需要binshare目录(实际上,在bin中,实际上只需要mysqld.exe作为运行服务器的绝对最低要求).

Extract the files. At a minimum you need the bin and share directories (actually, in bin, you really only need mysqld.exe as the absolute minimum to run a server).

编辑my.ini,将basedirdatadir路径更改为相对路径.例如:

Edit my.ini to change the basedir and datadir paths to something relative. For example:

basedir=".."
datadir="/MySQLdb"

  • 如果您没有现有数据库,则创建一个数据库:

  • If you do not have an existing database, then create one:

    mysqld --bootstrap
    

  • 运行服务器(在设置MySQL用户之前,您可能需要使用--skip-grant-tables开关使其运行):

  • Run the server (you may need to use the --skip-grant-tables switch to get it running until you have set up your MySQL user):

    mysqld
    

    • 为避免服务器在当前命令提示符下运行,可以使用以下命令使其在自己的控制台中运行,一旦运行,该控制台便会消失:

      • To avoid the server being run in the current command-prompt, you can use the following to have it run in its own console which should disappear once it is running:

        start mysqld
        

      • 如果遇到错误,请删除日志文件(例如logs\ib_logfile*),然后再次运行.

      • If you get errors, delete the log files (e.g., logs\ib_logfile*) and run it again.

        这篇关于MySql便携式版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆