MySQL数据库的位置变化不工作 [英] Change of MySQL database location not working

查看:251
本文介绍了MySQL数据库的位置变化不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新从WampServer 2.2和Windows 7 WampServer 2.5和Windows 10,更改数据库和文档位置以

Updating from WampServer 2.2 and Windows 7 to WampServer 2.5 and Windows 10. I change database and document locations with

basedir=D:/Progs/wamp/bin/mysql/mysql5.6.17
log-error=D:/Progs/wamp/logs/mysql.log
#datadir=D:/Progs/wamp/bin/mysql/mysql5.6.17/data
datadir=D:\Documents\MySQLdata

在D:\\ progs的\\ WAMP \\ BIN \\ mysql5.6.17 \\ my.ini文件,以及

in D:\Progs\wamp\bin\mysql5.6.17\my.ini, and

#DocumentRoot "D:/Progs/wamp/www/"
DocumentRoot "D:/Documents/WWW/"
...
#<Directory "D:/Progs/wamp/www/">
<Directory "D:/Documents/WWW/">

在D:\\ progs的\\ WAMP \\ BIN \\ apache的\\ apache2.4.9 \\的conf \\ httpd.conf文件。

in D:\Progs\wamp\bin\apache\apache2.4.9\conf\httpd.conf.

不过的phpMyAdmin仍指向D:\\ progs的\\ WAMP \\ BIN \\ mysql的\\ mysql5.6.17 \\数据和新的数据库是由那里。我相信,在上述变化在Windows 7 $ P $工作确定的旧版本重新安装pvious

phpMyAdmin however still points to D:\Progs\wamp\bin\mysql\mysql5.6.17\data and new databases are made there. I am certain that the changes above worked ok in previous reinstalls of the old version in Windows 7.

推荐答案

的phpMyAdmin不处理与数据库的路径走。相反,它与连接在该文件中的配置MySQL自己的config.inc.php

PHPMyAdmin doesn't go with the path for dealing with the database. Instead it connects to mysql itself with the configuration for that in the file config.inc.php.

在此更改你的的my.ini

# The MySQL server
[wampmysqld]

要这样:

# The MySQL server
[wampmysqld64]

重新启动,而且应该做的伎俩。

Restart and that should do the trick.

<一个href=\"http://stackoverflow.com/questions/25155243/changing-the-datadir-on-my-ini-file-is-not-being-respected-in-wamp\">This在这里发现

没有在这里工作:

既然你是在Windows上,看看到文件夹C:\\ ProgramData \\ MySQL的\\ MySQL服务器5.6(或类似),并更改my.ini的有

Since you are on Windows, look into the folder 'C:\ProgramData\MySQL\MySQL Server 5.6' (or similar) and change the my.ini there.

这篇关于MySQL数据库的位置变化不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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