Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases 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 November 18th, 2003, 02:22 PM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to Mysql as admin


I have completed MySQL installation on my windows machine .I can navigate to C:\mysql\bin directory .When I use " >mysqladmin -uroot password abcdef " ,to set up admin user name and password this error is shown:
mysqladmin: connecting to server at'localhost' faild
error: access denied for user: 'root@localhost' (Using password: NO)'

But I can connect to the data base by usinig only username and not any password .And the result is that I can not USE the mysql data base ,however I can use the test database.

Note that I am the administrater of this machine and both the server and the client are installed on my machine.

Thanks in advance.



Reply With Quote
  #2 (permalink)  
Old November 18th, 2003, 11:09 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You're not sending your password properly. The syntax for the mysqladmin command is:

mysqladmin [options] commands

Options begin with a - sign, so in your example, "password" and "abcdef" are interpreted as commands.

Type "mysqladmin" by itself on the commandline to get a list of options. You should see that you need either -p or --password= to specify a password on the commandline.

A note about security, though: If you're on a shared system, NEVER NEVER NEVER NEVER run an application by entering your password on the commandline. Any user that can view a process list will see your password as one of the options passed to the application you're running. This is easier to do on a linux/unix server than Windows, but you should be aware of it.



Take care,

Nik
http://www.bigaction.org/
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
Database GUI – Admin & Dev tool for MySQL malbest MySQL 1 February 6th, 2008 07:49 AM
Connecting to MYSQL from C / C++ ? oloeriubogdan Linux 1 December 15th, 2006 10:50 AM
Trouble connecting with .mdf file and admin tools Shell84 ASP.NET 2.0 Basics 1 February 27th, 2006 01:08 PM
Connecting to mySQL WIx ASP.NET 1.0 and 1.1 Basics 3 October 17th, 2004 04:13 PM
connecting to mysql using Php webmoron BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 6 August 24th, 2004 04:30 AM



All times are GMT -4. The time now is 01:58 PM.


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