LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 05: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, 06:01 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 54
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:30 AM
Unable To Login to X-System/Command Line as User drdroid Linux - General 4 02-08-2004 09:26 PM
Changin Graphical Login to command line login 3DLirio Linux - Newbie 2 10-16-2003 10:43 PM
MySQL 4.0.12 - command-line tetractis Programming 0 07-04-2003 07:00 AM
MySQL command line buddy Linux - General 3 01-16-2003 09:14 AM


All times are GMT -5. The time now is 10:30 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration