Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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

Reply With Quote
  #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.
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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?

Reply With Quote
  #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
Reply With Quote
  #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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.