连接到MySQL时访问被拒绝 [英] Access denied when connecting to MySQL
问题描述
警告:mysql_connect():用户拒绝访问:''ODBC @ localhost''(使用密码:NO)在第12行的c:\ appserv\www \ sql.php中
警告:mysql_select_db():提供的参数不是第13行c:\ appserv\www \ sql.php中有效的MySQL-Link资源
警告:mysql_query():对用户拒绝访问:''ODBC @ localhost''(使用密码:NO)在第14行的c:\ appserv\www \ sql.php中
警告:mysql_query():无法在第14行的c:\ appserv\www\sql.php中建立到服务器的链接
警告: mysql_insert_id():无法在第15行的c:\ appserv\www\sql.php中建立到服务器的链接
警告:mysql_close():提供的参数在第16行的c:\ appserv\www \\\ .sql.php中不是有效的MySQL-Link资源
感谢1st。
Warning: mysql_connect(): Access denied for user: ''ODBC@localhost'' (Using password: NO) in c:\appserv\www\sql.php on line 12
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\appserv\www\sql.php on line 13
Warning: mysql_query(): Access denied for user: ''ODBC@localhost'' (Using password: NO) in c:\appserv\www\sql.php on line 14
Warning: mysql_query(): A link to the server could not be established in c:\appserv\www\sql.php on line 14
Warning: mysql_insert_id(): A link to the server could not be established in c:\appserv\www\sql.php on line 15
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in c:\appserv\www\sql.php on line 16
thanks 1st.
推荐答案
Heya,jolinlim。欢迎来到TSDN!
哪里有连接到数据库的代码?
Heya, jolinlim. Welcome to TSDN!
Where''s the code that connects to the database?
我们需要查看连接到db的代码,
否则请确保脚本中的用户名和密码与mysql数据库连接设置中的用户名和密码相同。
we need to see the code that connects to the db,
Otherwise make sure the username and password in your script is the same as that in your mysql database connection settings.
下面是sql.php
below is sql.php
这篇关于连接到MySQL时访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!