mysql将无法连接 [英] mysql will not connect

查看:82
本文介绍了mysql将无法连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是第3行-> if(!$ con)
{
die(``无法连接''.mysql_error());
}

mysql_select_db("kyle",$ con);

总是在浏览器中显示为错误:您的SQL语法有错误;请查看与MySQL服务器版本相对应的手册,以在第3行的'''')''附近使用正确的语法"

我将其打开为"http"而不是"file",并且我在xp上使用phpmyadmin,同时运行apache和mySQL,有人有任何想法吗?

this is line 3 -->if (!$con)
{
die(''Could not connect'' . mysql_error());
}

mysql_select_db("kyle", $con);

always appears in the browser as "Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''')'' at line 3"

i am opening it as "http" not "file" and i am using phpmyadmin on xp, with apache and mySQL running, anyone have any ideas?

推荐答案

con)
{
die(``无法连接''.mysql_error());
}

mysql_select_db("kyle",
con)
{
die(''Could not connect'' . mysql_error());
}

mysql_select_db("kyle",


con);

总是在浏览器中显示为错误:您的SQL语法有错误;请查看与MySQL服务器版本相对应的手册,以在第3行的'''')''附近使用正确的语法"

我将其打开为"http"而不是"file",并且我在xp上使用phpmyadmin,同时运行apache和mySQL,有人有任何想法吗?
con);

always appears in the browser as "Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''')'' at line 3"

i am opening it as "http" not "file" and i am using phpmyadmin on xp, with apache and mySQL running, anyone have any ideas?


如果您拥有MySQL语法错误,那么您必须连接到服务器.它说在第3行"表示SQL查询的第3行,而不是PHP.
If you''ve got a MySQL syntax error, then you must be connected to the server. Where it says "at line 3" it means line 3 of an SQL query, not the PHP.


这篇关于mysql将无法连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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