LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2010, 05:56 AM   #1
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Rep: Reputation: 18
can't connect to mysql server


hi
i want to learn mysql !!
i have a pc with no lan/wan connections (i mean no server-client relation)
i installed mysql using synaptic , when it was installing mysql,it asked me for password (opened a window) .
then i typed in terminal

mysql --user=username

output is :

ERROR 1045 (28000): Access denied for user 'rohit'@'localhost' (using password: NO)

i am a complete newbie so plz give step by step advice ,
thanks in advance
 
Old 08-06-2010, 06:47 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
use -p option with mysql command

Code:
mysql -uusername -p

for exa.
mysql -uroot -p

Last edited by sem007; 08-06-2010 at 06:48 AM.
 
Old 08-06-2010, 06:56 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Have you set that user in mysql? MySQL users differ from the system users. By default you can login to mysql using root, create mysql user called rohit with whatever password you desire, give appropriate permissions and then use it.
 
Old 08-06-2010, 08:23 AM   #4
rhklinux
Member
 
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Original Poster
Rep: Reputation: 18
thanks you both , -p had done its work, i will try the 2nd reply too
 
  


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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:54 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
Open Source Consulting | Domain Registration