LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-03-2006, 04:11 AM   #1
alok.rhct
Member
 
Registered: Dec 2005
Posts: 75

Rep: Reputation: 16
mysql server connection error


hi all,
i m attemping to rum mysql on centos 4 (kernle 2.6)

it install and started well.but when i use

[root@file1 ~]# mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

[root@file1 ~]# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
4
4.1.20)%z\<W!<,MKr~@cQKfAPNConnection closed by foreign host.


[root@file1 ~]# rpm -qa mysql
mysql-4.1.20-1.RHEL4.1

[root@file1 ~]# rpm -qa mysql-*
mysql-server-4.1.20-1.RHEL4.1
mysql-devel-4.1.20-1.RHEL4.1
mysql-bench-4.1.20-1.RHEL4.1
mysqlclient10-devel-3.23.58-4.RHEL4.1
mysqlclient10-3.23.58-4.RHEL4.1

[root@file1 ~]# netstat -a | grep mysql
tcp 0 0 *:mysql *:* LIST EN
unix 2 [ ACC ] STREAM LISTENING 323597 /var/lib/mysql/mysql.so ck

[root@file1 ~]# ls -l /var/lib/mysql/
total 20528
-rw-rw---- 1 mysql mysql 10485760 Oct 3 14:11 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Oct 3 14:11 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Oct 2 15:44 ib_logfile1
drwx------ 2 mysql mysql 4096 Oct 2 15:44 mysql
srwxrwxrwx 1 mysql mysql 0 Oct 3 14:11 mysql.sock
drwx------ 2 mysql mysql 4096 Oct 2 15:44 test

[root@file1 ~]# service mysqld status
mysqld (pid 21910) is running...


[root@file1 ~]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
#old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
~

[root@file1 ~]# ps aux | grep mysqld
root 21882 0.0 0.2 5276 1092 pts/2 S 14:11 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql
mysql 21910 0.0 3.6 125020 18320 pts/2 Sl 14:11 0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
root 22108 0.0 0.1 5024 632 pts/3 R+ 14:34 0:00 grep mysqld

[root@file1 ~]#mysql -u root mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


Now can any one help me to how to proceed.
i had gone through goole .all says check that mysqld runing.

their is all over dark.pls show me a light.
thanks in advance
 
Old 10-04-2006, 05:55 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
Did you do this;
mysqladmin -u root password 'passwordyouwant'
Now that the root password is set, connect to your MySQL server:
mysql -u root -p
what happens?
 
  


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
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. Dannux Linux - Software 3 03-24-2006 08:44 AM
ERROR 2013: Lost connection to MySQL server during query kicap Linux - Software 0 11-23-2004 08:30 PM
Error: lost connection to MySQL server during query patpawlowski Programming 2 01-23-2004 07:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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