使用kohana从phpmyadmin生成的SQL转储中创建表 [英] Create tables from SQL dump generated by phpmyadmin using kohana

查看:57
本文介绍了使用kohana从phpmyadmin生成的SQL转储中创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文件中有一个PHPMyAdmin SQL转储.我想使用PHP执行此SQL.我该怎么办?我尝试了一个简单的查询(使用Kohana,但没有查询就足够了!),但是出现语法错误. 我该怎么办?

I have a PHPMyAdmin SQL dump in a file. I want to use PHP to execute this SQL. How could I do that? I've tried a simple query (with Kohana but without it is enough too!) but I got a syntax error. How could I do that?

推荐答案

好吧,这与Kohana无关.我建议您不要通过PHP执行此操作,因为这样会存在内存和时间限制.如果可以,请使用终端.

Well this has nothing to do with Kohana. I would recommend you not do this through PHP as you then have memory and time constraints. If you can, use the terminal.

mysql -u [username] -p [password] [database name] < [filename.sql]

用各自的值替换[value].

这篇关于使用kohana从phpmyadmin生成的SQL转储中创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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