Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old June 18th, 2004, 12:57 AM
Registered User
 
Join Date: Jun 2004
Location: Bangkok, , Thailand.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mimt
Default Problem regarding setting up Privilege

Hello, i'm nebies here! I really need your help about setting up MySQL privileges.
I've newly installed MySQL and have successfully follow as the book said until when it's time to set up privileges.

I typed this DELETE FROM user WHERE Host='localhost' AND User='';. However, instead of returning the Query Ok results I got this Error 1046: No Database Selected instead. What does this mean? How do I solve it? Please help me!

P.S. I'm using Windows XP Pro and MySQL 4.0.20a for windows....

Thanks in advance,
MIMT

  #2 (permalink)  
Old June 18th, 2004, 06:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Type:

USE mysql;

First.

You should get a:

Database changed

Message. "No Database Selected" means exactly that: yoou're in, but you haven't chosen a database to work with yet. "mysql" is the name of MySQL's own internal configuration database.
  #3 (permalink)  
Old June 18th, 2004, 10:01 PM
Registered User
 
Join Date: Jun 2004
Location: Bangkok, , Thailand.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mimt
Default

Okay, I've tried what you've wrote. Here's another error... Error 1044: Access denied for user: '@localhost' to database 'mysql'

What should I do, next?

P.S. I remembered checking the list of the database I have... there's only one which is TEST, and there's no mysql database or others.

I tried using the same script 'DELETE FROM...' after i changed to test database but still error came up. Error 1466: table 'test.user' doesn't exit
  #4 (permalink)  
Old June 19th, 2004, 12:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi MIMT,

what is the username you used to login to mysql? This ERROR message is a result usually of the user not logging onto mySQL correctly.

That cannot happen. MYSQL is the master database for mysql server. without that exisiting you cannot even access that database server.

BTW, can you post the method/code you used to login to your mysql server and to check the list of databases in the sequence you used?

Cheers!

_________________________
-Vijay G
Strive for Perfection
  #5 (permalink)  
Old June 19th, 2004, 09:13 PM
Registered User
 
Join Date: Jun 2004
Location: Bangkok, , Thailand.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mimt
Default

Hi again,

I'm trying set up the password for my root access and so I'm guessing that the username must be root isn't it suppose to be? For as far as I know, I haven't set up any special username (e.g. my name) or any password yet. I have just learned (in book) to configure MySQL installation. And here's where I reach:

1.) c:\mysql\bin\mysql (I tried using c:\mysql\bin\mysql mysql but it said access denied)
2.) mysql> DELETE FROM user WHERE Host='localhost' AND User=''; (and this is where I stuck)!

And this is the method I used for checking the Database list show databases; (found in www.mysqlfreaks.com)

P.S. This is my first time using MySQL... very very first.... :( What do you think goes wrong?

  #6 (permalink)  
Old June 21st, 2004, 04:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mimt,
You may take a look at these pages to understand how username and password needs to be used to login to mysql and details about the user table and privileges.

MySQL Usernames and Passwords

How the Privilege System Works

Hope that helps.
Cheers!

_________________________
-Vijay G
Strive for Perfection
  #7 (permalink)  
Old August 19th, 2004, 04:09 PM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The solution is to instal a mysql free tool in you system. I had a lot of these head aches. But I install PHPMYADMIN -- ofcours if you just want to use the database. With this tool you can easly manage your database and you learn more about this.

Najib



Similar Threads
Thread Thread Starter Forum Replies Last Post
which privilege for creating a db and tables? hertendreef SQL Server 2005 5 July 11th, 2007 04:04 PM
Problem with setting up the projects bharat991 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 July 14th, 2006 07:57 AM
How to find privilege to be grant to other users? Edward King Oracle 1 July 20th, 2005 05:10 AM
active user privilege update problem dbae2000 Visual C++ 0 November 15th, 2004 09:42 PM
how can I update user privilege in VB? dbae2000 VB How-To 0 November 15th, 2004 09:39 PM





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