Current location: Hot Scripts Forums » Programming Languages » PHP » Warning: mysql_connect()


Warning: mysql_connect()

Reply
  #1 (permalink)  
Old 02-16-06, 11:49 AM
wzzly wzzly is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Warning: mysql_connect()

I got a gamescript and I wanna install it on my apache server. I installed, apache, php, msql and myphpadmin and everything works!

The problem is when I put the script on my server I got this message:

-------------------------------------------
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 's'@'localhost' (using password: NO) in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 9

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 10

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 10

Warning: main() [function.main]: open_basedir restriction in effect. File(C:\php5\pear/ipcheck.php) is not within the allowed path(s): (e:\inetpub\wwwroot\users) in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 14

Warning: main(ipcheck.php) [function.main]: failed to open stream: Operation not permitted in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 14

Warning: main() [function.include]: Failed opening 'ipcheck.php' for inclusion (include_path='.;C:\php5\pear') in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 14

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 18

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 18

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in e:\Inetpub\WWWroot\Users\i163433\gamescript\gamepa gina\config.php on line 19
-------------------------------------------------------------------

I made the database 'games' in phpmyadmin...
What's wrong??

ps.. I a noob to php and msql...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-16-06, 12:06 PM
YourPHPPro's Avatar
YourPHPPro YourPHPPro is offline
Community VIP
 
Join Date: Aug 2003
Posts: 430
Thanks: 0
Thanked 0 Times in 0 Posts
The problem is that PHP is not able to connect to mySQL using the information you provided:

Quote:
Access denied for user 's'@'localhost'
Quote:
Access denied for user 'ODBC'@'localhost'
If you haven't setup any usernames/passwords for mySQL, the permissions may be 'root' for username and no password.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 02-16-06, 01:46 PM
wzzly wzzly is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
stil got this when I changed user to root:

---------------------------

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\server\Apache2\htdocs\Gamescript\config.php on line 9

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\server\Apache2\htdocs\Gamescript\config.php on line 10

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\server\Apache2\htdocs\Gamescript\config.php on line 10

Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\server\Apache2\htdocs\Gamescript\config.php on line 18

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\server\Apache2\htdocs\Gamescript\config.php on line 18

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\server\Apache2\htdocs\Gamescript\config.php on line 19
--------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 02-16-06, 02:02 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Once you have created the database, you need to create a user that can access it, and give the user privileges for that database.

This page is an excellent starting point:

http://us2.php.net/manual/en/function.mysql-connect.php

This page can help you add the user.

http://dev.mysql.com/doc/refman/4.1/...ing-users.html

The software you're trying to install probably has an installation script that will guide you through.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 02-16-06, 02:57 PM
wzzly wzzly is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
can I create users for my database with myphpadmin???
If yes.. how??

myphpadmin user is root...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 02-16-06, 04:00 PM
wzzly wzzly is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
it got it... but now I have another problem...:

-------------------------------------
Warning: main(ipcheck.php) [function.main]: failed to open stream: No such file or directory in C:\server\Apache2\htdocs\Gamescript\gamepagina\con fig.php on line 14

Warning: main() [function.include]: Failed opening 'ipcheck.php' for inclusion (include_path='.;C:\php5\pear') in C:\server\Apache2\htdocs\Gamescript\gamepagina\con fig.php on line 14

----------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 02-16-06, 04:05 PM
wzzly wzzly is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
it got it... but now I have another problem...:

-------------------------------------
Warning: main(ipcheck.php) [function.main]: failed to open stream: No such file or directory in C:\server\Apache2\htdocs\Gamescript\gamepagina\con fig.php on line 14

Warning: main() [function.include]: Failed opening 'ipcheck.php' for inclusion (include_path='.;C:\php5\pear') in C:\server\Apache2\htdocs\Gamescript\gamepagina\con fig.php on line 14

----------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 02-17-06, 06:09 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
ffs stop posting everytime you get an error! try reading what its telling you...

Warning: main(ipcheck.php) [function.main]: failed to open stream: No such file or directory in C:\server\Apache2\htdocs\Gamescript\gamepagina\con fig.php on line 14

__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning: Wrong parameter count... Tim Mousel PHP 5 01-23-06 01:10 PM
Active X Warning?? Seeker HTML/XHTML/XML 0 09-06-05 03:33 PM
Warning: session_start(): Cannot send session cache limiter jozin PHP 4 07-13-05 12:47 AM
An unknown warning Slypher PHP 1 02-12-05 04:24 AM
Competition form dee19802000 PHP 2 01-27-05 03:48 PM


All times are GMT -5. The time now is 12:25 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.