WAMP 中不考虑更改 my.ini 文件上的 datadir

2024-01-09

我通常不会问这个问题,但我却用这个问题来撞墙。我正在尝试设置 WAMP 以与 Dropbox 配合使用。我已经使用过这两个教程(http://mymediamagnet.com/how-to-setup-wamp-with-dropbox/ http://mymediamagnet.com/how-to-setup-wamp-with-dropbox/ and http://abhisheksachan.blogspot.com/2012/08/web-development-environment-made-easy.html http://abhisheksachan.blogspot.com/2012/08/web-development-environment-made-easy.html)因为他们都告诉我同样的事情。

您在 Apache 中所做的 httpd.conf 设置效果很好。我的新 www 文件夹中的所有文件都受到尊重,并在 Dropbox 中的多台计算机上共享。但我将数据库文件存储在 Dropbox 中的设置似乎没有得到尊重。

我已编辑 my.ini 文件以在 datadir 中包含正确的 Dropbox mysql 文件夹。我已将这里的所有内容复制到:C:\wamp\bin\mysql\mysql5.6.17\data 到这个新的 Dropbox mysql 文件夹。但是每次我打开 phpmyadmin,并添加或删除数据库时,它都会在旧的 wamp 文件夹中执行:C:\wamp\bin\mysql\mysql5.6.17\data。

我在这里找到这个 my.ini 文件:C:\wamp\bin\mysql\mysql5.6.17 所以我知道它是 WAMP 应该使用的文件。我尝试通过完全删除它来排除故障,搞乱文件中的所有数据,但 mysql 只是继续工作并查看旧数据库文件夹。

所以我唯一的想法是这个配置文件没有被尊重。顶部有一些说明,我不完全理解这是一个示例文件,但我到处都看到这就是 wamp 所查看的内容。所以现在我迷路了,不知道为什么它不起作用。

请帮忙。这是我的整个 my.ini 文件,因为我确信密钥就在那里。

# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password   = your_password
port        = 3306
socket      = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[wampmysqld]
port        = 3306
socket      = /tmp/mysql.sock
key_buffer_size = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
basedir=c:/wamp/bin/mysql/mysql5.6.17
log-error=c:/wamp/logs/mysql.log
datadir=c:/Users/E Money/Dropbox/wamp/mysql

lc-messages-dir=c:/wamp/bin/mysql/mysql5.6.17/share

# Change your locale here !
lc-messages=fr_FR

# Avoid warning
explicit_defaults_for_timestamp = TRUE

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
#skip-networking

# Disable Federated by default
skip-federated

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# binary logging format - mixed recommended
binlog_format=mixed

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1

# Replication Slave (comment out master section to use this)


# New for MySQL 5.6 if no slave
skip-slave-start

#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir     = /tmp/     
#log-update     = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
#innodb_log_arch_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld]
port=3306
explicit_defaults_for_timestamp = TRUE

64位WAMPServer 2.5版本有一个小bug

在 64 位 my.ini 中更改此设置

From

# The MySQL server
[wampmysqld]

To

# The MySQL server
[wampmysqld64]

该节头必须与 MySQL 服务器运行的服务名称匹配,在 64 位 WAMPServer 上它被更改为 wampmysqld64,但该节头被忘记了。

注意:您不需要仅仅因为您的操作系统是 Windows 64 位就运行 64 位 WAMPServer。

事实上,64 位 PHP 还不是一个完整的端口,仍然被认为是“实验性的”

此外,相当多的 PHP 扩展还没有转换为 64 位,因此最好保留 32 位 WampServer ( Apache/MySQL/PHP ),除非您有一些非常具体的需要使用 64 位版本。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

WAMP 中不考虑更改 my.ini 文件上的 datadir 的相关文章

随机推荐

  • 我怎样才能从 Youtube api 检索版权问题?

    我尝试使用 Youtube data api 获取一些 Youtube 视频信息 我特别想知道如何检索盗版信息 我检查了下面的参考 但我不知道怎么办 https developers google com youtube v3 https
  • 减少“读取时”循环的处理时间

    shell 脚本新手 我有一个巨大的 csv 文件 其长度 f11 不同 例如 000000aaad000000bhb200000uwwed 000000aba200000bbbrb2000000wwqr00000caba2000000bh
  • 如何使用 Ruby 将一行中的多个换行符替换为一个换行符

    我有一个用红宝石编写的脚本 我需要删除任何重复的换行符 例如 n n n to n 我当前的尝试有效 或者更确切地说没有 使用 str gsub n n n 这并没有改变我的输出 我究竟做错了什么 这对我有用 usr bin ruby s
  • 如何异步下载 ListView HTML 图像?

    作为原型 我正在尝试修改android imagedownloader 演示 http code google com p android imagedownloader 来自Android 开发者博客 http android devel
  • Python Flask WTForms:如何在视图中动态禁用字段?

    我已经能够实施这个变化 https stackoverflow com questions 14874846 python flask wtforms make read only textfield创建在 WTForms 中禁用的字段 在
  • 使用 npm init react-app 时 Docker 容器启动后立即退出

    我正在尝试使用 React 项目启动 Docker 容器 该项目是使用 npm init react app 创建的 这是我的 docker 文件 Specify a base image FROM node alpine WORKDIR
  • 无法在 Android Oreo 更新中保存图像文件。怎么做?

    我无法在 android oreo 8 0 api 26 中保存图像文件 该代码在 api 级别 25 7 0 中完美运行 我在文档中没有发现任何更改 Android 8 0 行为变更 https developer android com
  • 如何在 play 框架 scala ws 调用中忽略 ssl 验证

    我想要使 用使用无效证书 自签名 的 Web 服务 我想在不执行任何类型的证书验证的情况下进行 Web 服务调用 我该怎么做 在您的 application conf 中添加以下行 ws acceptAnyCertificate true
  • 数据库或 Web 应用程序中的分页选择

    我正在考虑重新设计我们网站的报告页面以使其更快 但我对应该如何实现分页持观望态度 我们的数据库很大 超过 1 5 亿条记录 我们的大多数报告需要来自最多 5 到 10 个表的复杂数据 因此每个表可能有 5 或 6 个联接和一些内部选择 显然
  • 如何在从 Linux 移植的 C++ 项目中使用 OpenGL

    我只是尝试在我的 Mac 上编译一个开源 C 应用程序 我收到错误 GL gl h 文件未找到 我知道这意味着它找不到需要编译和运行的 open GL 库 我对下一步该做什么感到困惑 因为 看起来 OS X 内置了对 open gl 的支持
  • AspNetCore中间件UserManager依赖注入

    我有一个多层应用程序 是我开始在 ASP NET Core 1 1 中编写的 我仍在不断学习 我像以前在 Web API 中所做的应用程序一样组织它 我有主机服务 网络核心应用程序 业务层和数据库之上的数据层 业务层和数据层是 net co
  • JQuery/Javascript 重新排序行

    我有一个 aspx 页面 看起来像这样 tr td Some label td td Some complex control td tr tr td Some label td td Some complex control td tr
  • 同一类上的两个类别具有相同的方法名称

    我注意到 UIImageView 上的 AFNetworking 和 SDWebImage 类别具有相同的方法名称 AF网络 void setImageWithURL NSURL url self setImageWithURL url p
  • Django 站点地图和“普通”视图

    也许我不明白站点地图的目的 或者也许我不明白如何使用站点地图 现在 我的站点地图包括所有 动态 创建的页面 例如博客文章 但是如何添加 静态 页面 例如我的索引和联系页面 或者这些视图不应该出现在站点地图中吗 我认为所有页面都应该在站点地图
  • 将文件解压到内存的最佳 Api

    我正在开发一个 Qt 应用程序 我们必须读取压缩文件或 QByteArrays 并将它们解压缩到内存中 读取文件内容而不实际将文件解压缩到磁盘 有没有好的sdk可以轻松实现这一点 我们目前使用 QArchive 无错误 但我们发现它根本不是
  • 通过命令行运行时如何连接到数据库

    当我从浏览器运行 zend 框架项目时 一切正常 它连接到数据库 当我从命令行运行项目时 它无法连接到数据库并引发错误 致命错误 未捕获异常 PDOException 并带有消息 SQLSTATE HY000 2002 没有这样的文件或目录
  • 测试中的 NestJS 全局模块

    有没有办法自动提供所有 Global模块成TestModule 即无需导入它们 与主应用程序的工作方式相同 到目前为止 我必须确保将任何全局模块插入到import我的通话清单 await Test createTestingModule i
  • 尝试使用 linq 转换数据[重复]

    这个问题在这里已经有答案了 我有以下类结构 public class TaskLog public DateTime LogDate get set public string Robot get set public string Tas
  • 联合内位域的对齐

    我对以下代码如何在内存中布局感到有点困惑 struct Thing union unsigned value 24 uint8 t bytes 3 Thing int v value v void foo printf Thing p va
  • WAMP 中不考虑更改 my.ini 文件上的 datadir

    我通常不会问这个问题 但我却用这个问题来撞墙 我正在尝试设置 WAMP 以与 Dropbox 配合使用 我已经使用过这两个教程 http mymediamagnet com how to setup wamp with dropbox ht