将mysql数据目录更改为Windows中的网络位置

时间:2013-07-30 16:02:20

标签: mysql windows networking

我需要将windows上mysql的datadir更改为net location \ 192.168.1.101 \ something 我尝试这个解决方案:

https://dba.stackexchange.com/questions/24403/change-existing-datadir-path-in-mysql

我创建文件my.ini

[mysqld]
datadir=\\192.168.1.101\something

但这不起作用;

C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -hlocalhost -u root -p
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like 'datadir';
+---------------+-----------------------------------------------------------------------------------+
| Variable_name | Value                                                                             |
+---------------+-----------------------------------------------------------------------------------+
| datadir       | C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.6\data\ |
+---------------+-----------------------------------------------------------------------------------+

如何将我的数据目录更改为Windows中的网络位置?

0 个答案:

没有答案