LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't connect to mysql server (https://www.linuxquestions.org/questions/linux-newbie-8/cant-connect-to-mysql-server-824552/)

rhklinux 08-06-2010 05:56 AM

can't connect to mysql server
 
hi :newbie:
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

sem007 08-06-2010 06:47 AM

use -p option with mysql command

Code:

mysql -uusername -p

for exa.
mysql -uroot -p


linuxlover.chaitanya 08-06-2010 06:56 AM

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.

rhklinux 08-06-2010 08:23 AM

thanks you both , -p had done its work, i will try the 2nd reply too :)


All times are GMT -5. The time now is 05:12 AM.