Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2005, 11:39 AM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 137
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL Config Problems

I have recently began reading Beginning PHP5, Apache, MySQL Web Development by Wrox Press.

Having successfully installed, configured and tested Apache and PHP5. I have run into problems with MySQL Ver 4.0.15

Using the DOS prompt I'm able to run another of tests such as:

c:\mysql\bin\mysql test

or

NET START / STOP MySQL

or

show databases;

However when I attempt to run any kind of query such as:

SHOW COLUMNS FROM user FROM mysql;

or

SELECT user, host FROM user;

or

DELETE FROM user WHERE Host='localhost' AND User='';

I get the following error each time:

ERROR 1046: NO DATABASE SELECTED

Having followed the instructions in the book, I'm a little puzzled to how some commands work, while others dont. Could somebody advise where I might be going wrong?

Gaz
__________________
Gaz
 
Old July 26th, 2005, 07:22 AM
Registered User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try starting with:

  use database_name_here;

This should tell MySQL what database you are wishing to operate on.

Regards

Jeremy

 
Old September 1st, 2005, 06:09 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default

SHOW DATABASES;

will show you what databases are available to USE also.







Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config problems tjordan43 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 October 23rd, 2007 02:56 AM
Problems with web.config file !!!!!!!! _fluffy_ BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 14th, 2006 10:02 AM
Problems with php and mysql jessica368 MySQL 0 November 3rd, 2005 04:36 PM
Microsoft IIS webserver config problems taraj ASP.NET 1.0 and 1.1 Basics 3 September 20th, 2004 03:42 AM
connect to mysql problems Deuce868 JSP Basics 1 March 7th, 2004 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.