MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old August 26th, 1999, 09:12 AM
rwiegmann
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi - The following code prints the test message but bombs on the databse selection:

<HTML>
<BODY>
<?
$host="localhost";
$user="myuser";
$password="mypass";
$mysql_link=mysql_connect ($host,$user,$password) or die("Connection failed");
print("This is a test");
$mysql_select_db('joesauto', $mysql_link);
$query="SELECT * FROM joesauto";
$mysql_result=mysql_query($query, $mysql_link);
$mysql_close($mysql_link);
?>
</BODY>
</HTML>

Any ideas?

Reply With Quote
  #2  
Old August 26th, 1999, 09:45 AM
moderator
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I'm guessing that your problem is most likely in the permissions you have set. Check the db table of the mysql database....there should be one entry that has both the database name 'joesauto' and the desired username. Then you'll need to specify a set of privledges for that user.

Once you are done editing the mysql database you'll need to run 'mysqladmin reload' from the prompt.

For more information on MySQL's privledge system check out:
http://www.devshed.com/Server_Side/MySQL/Administration/page2.html

Or the documentation at:
http://www.devshed.com/Server_Side/MySQL/Manual/manfiles/manual_Privilege_system.html#Privilege_system

Reply With Quote
  #3  
Old August 26th, 1999, 04:07 PM
rwiegmann
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi My ISP said that these two statements should NOT have a "$" in front:

$mysql_select_db('joesauto', $mysql_link);
$mysql_close($mysql_link);

Does this make sense? It seems to work - but how can I know when to delete these "$" from examples?



[This message has been edited by rwiegmann (edited 08-26-99).]

Reply With Quote
  #4  
Old August 26th, 1999, 05:25 PM
moderator
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Yes, I'm sorry I didn't look at your code close enough. Your ISP is right....those two statements should not have dollar signs before them.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Connect OK!! Select database - Not OK :-(


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway