|
|
 |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6  | This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

August 7th, 2007, 02:26 PM
|
|
Registered User
|
|
Join Date: Aug 2007
Location: College Station, TX, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ch1 MySQL returns Error 1046: No database selected
I'm working on configuring mysql and mostly everything but one issue I'm having with is that many of my commands will return the Error 1046: No database selected.
Here is an example of code
C:\>mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor..
..
..
mysql>show tables;
ERROR 1046 (3D000): No database selected
mysql>SELECT user, host FROM user;
ERROR 1046 (3D000): No database selected
mysql>show databases;
*---------*
Database
----------
information_schema
mysql
test
--------
3 rows...
------------
As you can see I've got mysql installed and everything, and PHP works with mysql, but I don't know where this error message is coming from. What can I do to fix this? Keep in mind that I don't have an extensive background with setting up networks. Thanks
|

October 1st, 2007, 03:47 PM
|
|
Registered User
|
|
Join Date: Oct 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
in order to show anything you have to select the data base. try "use test" after that you can see what is in it. to see what users you have in your data base, first change to the mysql database. "use mysql" then type "select user, host, password from user;" that will show you the info you want in the second command.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |