LinuxQuestions.org
Register a domain and help support LQ
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-31-2003, 01:01 AM   #1
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 74

Rep: Reputation: 15
mysql connection problem


hi every one , i have problem with mysql connection.
i try to connect like this
mysql -u root mysql
then i got connection error like this
Error 1045:access denied for user: 'root@localhost' (using password No)

I suspect it is my host name problem because i am still using localhost as my shell still prompt:
[root@localhost]#


Can anyone tell me how can i make a connection with mysql. My PC is connected to a LAN with dynamic IP address.
What is error 1045. Where can i check for this error.

My other linux box that is not connected to LAN works fine without error with host name localhost. ????
Thanks for your help.
 
Old 05-31-2003, 02:30 AM   #2
eggers
LQ Newbie
 
Registered: May 2003
Distribution: RH 7.x/8.x, RHLAS 2.1, and / SLES 7&8
Posts: 3

Rep: Reputation: 0
Are you certain you have the user "root" defined for your mysql DB? I tried the following, and I think that may be your issue. Note your users for mysql and for your system are not related -- you need to create whatever users you need in mysql in addition to your OS users....

[root@monkey root]# mysql -u nugget mysql
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
[root@monkey root]# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20 to server version: 3.23.41

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye
[root@monkey root]# mysql -u admin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21 to server version: 3.23.41

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
 
  


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
mysql connection problem I_AM Linux - General 2 10-27-2005 11:02 PM
MySQL/Java connection problem hudy Programming 3 06-23-2004 09:40 PM
php / mysql connection problem . MikeFoo1 Programming 3 05-02-2004 06:22 PM
MySQL connection LINUX domain Socket problem herambshembekar Programming 2 10-18-2002 01:01 PM
MySQL server connection problem aeshley Programming 1 03-05-2002 10:59 PM


All times are GMT -5. The time now is 10:00 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