LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2005, 04:35 PM   #1
tortle
Newbie
 
Registered: Jul 2004
Location: Wisconsin
Distribution: OpenSUSE, SUSE, Slackware
Posts: 22

Rep: Reputation: 15
MySQL: Login as Blank User From Command Line


Hi:

Just used a MySQL 'GRANT' statement to give ''@'localhost' privs on a new db.
I wanted to run some tests from the mysql command line client before trying via PHP.
So I tried:
Code:
mysql -u
mysql -u ''
mysql -u '' -p
mysql --user='' -p
mysql --user= -p
but I keep getting "Access denied for user 'joe@localhost' ..." (where 'joe' is my username on the host box).

Anyone know the syntax for specifying "user==blank" from the command line? (Note: just leaving out the '-u' won't work; that also defaults to 'joe'.)

Thanks.
 
Old 05-14-2005, 05:01 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Code:
# An important point to note is that this database is created by the root and so will not be accessible to any other user unless permitted by the root. Thus, in order to use this database from my account (called manish), I have to set the permissions by issuing the following command:

GRANT ALL ON employees.* TO manish@localhost IDENTIFIED BY "eagle"

The above command grants my account (manish@localhost) all the permissions on employees database and sets my password to eagle. You should replace manish with your user name and choose an appropriate password.
From this how to;
http://www.webdevelopersnotes.com/tu..._tutorial.php3
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crazy blank dialog boxes and windows at login. Can't login as user soren625 Linux - General 2 08-11-2004 06:30 AM
Unable To Login to X-System/Command Line as User drdroid Linux - General 4 02-08-2004 08:26 PM
Changin Graphical Login to command line login 3DLirio Linux - Newbie 2 10-16-2003 09:43 PM
MySQL 4.0.12 - command-line tetractis Programming 0 07-04-2003 06:00 AM
MySQL command line buddy Linux - General 3 01-16-2003 08:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration