使用 wamp 服务器将数据库导入 mysql localhost
Importing a database into mysql localhost using wamp server
这听起来像是一个非常愚蠢的问题,但我不知道该怎么做?
我在我的 windows 机器上 运行 putty,我知道如果我想将数据库导入远程网站,我只需启动 putty 并输入主机名和我的用户名和密码。登录到 ssh,然后创建数据库,然后像这样导入数据库:mysql production < production_2015.sql
我不明白的是如何通过 ssh 进入驻留在我计算机上的本地主机。我有 phpMyAdmin,我可以选择继续像那样上传,但就像 phpMyAdmin 中的所有内容一样,它有主要的延迟问题。
我觉得问这个问题很愚蠢,但这是我尝试过的事情。打开腻子并在主机名所在的位置添加本地主机。我还尝试在 host/ip 进入 putty 的位置添加 IP 127.0.0.1。我经常遇到网络错误或连接被拒绝。在这一点上,我什至不确定你是否会这样做。我觉得这是一个超级简单的问题,但我无法全神贯注于答案。
这是我的 phpMyAdmin config.inc 文件:
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'me';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
如有任何帮助,我们将不胜感激。
根据你的路径,它会是这样的:
C:\xampp\mysql\bin\mysql.exe -u root -p production < production_2015.sql
this question 中有更多讨论可能会有所帮助。
这听起来像是一个非常愚蠢的问题,但我不知道该怎么做?
我在我的 windows 机器上 运行 putty,我知道如果我想将数据库导入远程网站,我只需启动 putty 并输入主机名和我的用户名和密码。登录到 ssh,然后创建数据库,然后像这样导入数据库:mysql production < production_2015.sql
我不明白的是如何通过 ssh 进入驻留在我计算机上的本地主机。我有 phpMyAdmin,我可以选择继续像那样上传,但就像 phpMyAdmin 中的所有内容一样,它有主要的延迟问题。
我觉得问这个问题很愚蠢,但这是我尝试过的事情。打开腻子并在主机名所在的位置添加本地主机。我还尝试在 host/ip 进入 putty 的位置添加 IP 127.0.0.1。我经常遇到网络错误或连接被拒绝。在这一点上,我什至不确定你是否会这样做。我觉得这是一个超级简单的问题,但我无法全神贯注于答案。
这是我的 phpMyAdmin config.inc 文件:
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'me';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
如有任何帮助,我们将不胜感激。
根据你的路径,它会是这样的:
C:\xampp\mysql\bin\mysql.exe -u root -p production < production_2015.sql
this question 中有更多讨论可能会有所帮助。