Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
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 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 November 18th, 2003, 02:22 PM
Registered User
 
Join Date: Nov 2003
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.



 
Old November 18th, 2003, 11:09 PM
Friend of Wrox
 
Join Date: Jun 2003
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/





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





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