473,404 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

linux mysql 'localhost' failed

RH 9.0

user mysql
command /usr/sbin/mysqld

mysql is being loaded at boot. the previous is listed when I check
what process are running with < ps -aux >

however:
[craig@localhost mysql]$ ./bin/mysqladmin version
../bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
is telling me that it isn't running ??
Jul 19 '05 #1
10 11487
craig wrote:
[craig@localhost mysql]$ ./bin/mysqladmin version
./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
is telling me that it isn't running ??


I think it is running, but clients try to connect to different socket
file than what the server is using. Either change file for server or
change it for clients. Or something has deleted the socket file. Read
more from:

http://www.mysql.com/doc/en/Can_not_...to_server.html

Jul 19 '05 #2
craig wrote:
[craig@localhost mysql]$ ./bin/mysqladmin version
./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
is telling me that it isn't running ??


I think it is running, but clients try to connect to different socket
file than what the server is using. Either change file for server or
change it for clients. Or something has deleted the socket file. Read
more from:

http://www.mysql.com/doc/en/Can_not_...to_server.html

Jul 19 '05 #3
I think it is running, but clients try to connect to different socket
file than what the server is using. Either change file for server or
change it for clients. Or something has deleted the socket file. Read
more from:


can you tell me.. is the mysql.sock suppose to me listed in my /tmp
directory? I followed the web source you directed me to. The "t" bit
on this directory has been set so no cron can remove mysql.sock as
suggested in the info related to my problem.

[craig@localhost craig]$ mysqladmin -h `hostname` version
mysqladmin Ver 8.40 Distrib 4.1.0-alpha, for pc-linux on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 4.1.0-alpha
Protocol version 10
Connection localhost.localdomain via TCP/IP
TCP port 3306
Uptime: 4 days 1 hour 19 min 47 sec

Threads: 1 Questions: 1 Slow queries: 0 Opens: 6 Flush tables: 1 Open tables: 0 Queries per second avg: 0.000
Above is the output of one of the suggested commands. It would
appear that I "don't" have a socket connection, but rather a TCP/IP
connection. My understanding is that it should be a sock connection
based on the fact that I'm trying to access mysql server from
the very machine that it is running on.

What should I be trying to do here to get something like
<./bin/mysqladmin create testDB > to work

any suggestions

thank you
craig
Jul 19 '05 #4
I think it is running, but clients try to connect to different socket
file than what the server is using. Either change file for server or
change it for clients. Or something has deleted the socket file. Read
more from:


can you tell me.. is the mysql.sock suppose to me listed in my /tmp
directory? I followed the web source you directed me to. The "t" bit
on this directory has been set so no cron can remove mysql.sock as
suggested in the info related to my problem.

[craig@localhost craig]$ mysqladmin -h `hostname` version
mysqladmin Ver 8.40 Distrib 4.1.0-alpha, for pc-linux on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 4.1.0-alpha
Protocol version 10
Connection localhost.localdomain via TCP/IP
TCP port 3306
Uptime: 4 days 1 hour 19 min 47 sec

Threads: 1 Questions: 1 Slow queries: 0 Opens: 6 Flush tables: 1 Open tables: 0 Queries per second avg: 0.000
Above is the output of one of the suggested commands. It would
appear that I "don't" have a socket connection, but rather a TCP/IP
connection. My understanding is that it should be a sock connection
based on the fact that I'm trying to access mysql server from
the very machine that it is running on.

What should I be trying to do here to get something like
<./bin/mysqladmin create testDB > to work

any suggestions

thank you
craig
Jul 19 '05 #5
craig wrote:
can you tell me.. is the mysql.sock suppose to me listed in my /tmp
directory? I followed the web source you directed me to. The "t" bit
on this directory has been set so no cron can remove mysql.sock as
suggested in the info related to my problem.


I have the socket file in:
/var/lib/mysql/mysql.sock

And I have this information in file:
/etc/mysql/my.cnf

( Some rows cutted off here )

# This will be passed to all mysql clients
[client]
#password = my_password
port = 3306
socket = /var/lib/mysql/mysql.sock

( Some rows cutted off here )

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/lib/mysql/mysql.sock
port = 3306

( Some rows cutted off here )

You could check the my.cnf file (If you have it) to see that mysqld and
client are both pointing to the same socket file. And then you could try
to search for the socket file to see where it actually is.

Jul 19 '05 #6
craig wrote:
can you tell me.. is the mysql.sock suppose to me listed in my /tmp
directory? I followed the web source you directed me to. The "t" bit
on this directory has been set so no cron can remove mysql.sock as
suggested in the info related to my problem.


I have the socket file in:
/var/lib/mysql/mysql.sock

And I have this information in file:
/etc/mysql/my.cnf

( Some rows cutted off here )

# This will be passed to all mysql clients
[client]
#password = my_password
port = 3306
socket = /var/lib/mysql/mysql.sock

( Some rows cutted off here )

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/lib/mysql/mysql.sock
port = 3306

( Some rows cutted off here )

You could check the my.cnf file (If you have it) to see that mysqld and
client are both pointing to the same socket file. And then you could try
to search for the socket file to see where it actually is.

Jul 19 '05 #7
Made some head way since my last message. I couldn't find a my.cnf
on my system. I did find my.large.cnf. I copied it to my /etc based
on the info I read at the mysql web site. I assumed that mysql.sock
would show up in my /tmp if at boot when the server is loaded
could indeed find a my.cnf. Oh and I renamed my.large.cnf to plain
my.cnf. I could have been my.big.cnf; their were two on my system
with by these names.

When I rebooted the sytem I found a mysql.sock in my /home/craig/tmp
directory.

When I tried to /usr/local/mysql/bin/mysqladmin create testDB I now
get:
[craig@localhost mysql]$ ./bin/mysqladmin create testDB
../bin/mysqladmin: CREATE DATABASE failed; error: 'Access denied
for user: '@localhost' to database 'testDB''

So I guess I now have to figure out I guess how I get access for
localhost?

thanks for opening some doors on this issue. Are you fmailiar with
how to assign access to a user?

This has been one long winding road. It's been a month yes a month
of loading various version of mysql and removing just to get
to this point. Maybe that is at the crux of my problems. Whatever
it has been a long ride getting to a point beyond initial
installation of mysql

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

the contents of my /etc/my.cnf
I have 512 meg bytes on this system which this cnf was said to be
suited for. Can you suggest which items to reduce it by. I don't
like maxing out my system with just this one server.
Jul 19 '05 #8
Made some head way since my last message. I couldn't find a my.cnf
on my system. I did find my.large.cnf. I copied it to my /etc based
on the info I read at the mysql web site. I assumed that mysql.sock
would show up in my /tmp if at boot when the server is loaded
could indeed find a my.cnf. Oh and I renamed my.large.cnf to plain
my.cnf. I could have been my.big.cnf; their were two on my system
with by these names.

When I rebooted the sytem I found a mysql.sock in my /home/craig/tmp
directory.

When I tried to /usr/local/mysql/bin/mysqladmin create testDB I now
get:
[craig@localhost mysql]$ ./bin/mysqladmin create testDB
../bin/mysqladmin: CREATE DATABASE failed; error: 'Access denied
for user: '@localhost' to database 'testDB''

So I guess I now have to figure out I guess how I get access for
localhost?

thanks for opening some doors on this issue. Are you fmailiar with
how to assign access to a user?

This has been one long winding road. It's been a month yes a month
of loading various version of mysql and removing just to get
to this point. Maybe that is at the crux of my problems. Whatever
it has been a long ride getting to a point beyond initial
installation of mysql

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

the contents of my /etc/my.cnf
I have 512 meg bytes on this system which this cnf was said to be
suited for. Can you suggest which items to reduce it by. I don't
like maxing out my system with just this one server.
Jul 19 '05 #9
craig wrote:
So I guess I now have to figure out I guess how I get access for
localhost?


Does it work if you write

mysql -u root

Because you shouldn't have any root password for mysql as default. You
can also try giving -u root parameter for mysqladmin if you prefer using
that. I suggest you to get familiar with mysql console client, because
it is very usefull tool.

Jul 19 '05 #10
craig wrote:
So I guess I now have to figure out I guess how I get access for
localhost?


Does it work if you write

mysql -u root

Because you shouldn't have any root password for mysql as default. You
can also try giving -u root parameter for mysqladmin if you prefer using
that. I suggest you to get familiar with mysql console client, because
it is very usefull tool.

Jul 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: barsepsi | last post by:
(I apologize for my "ugly" english... :-) I'm a beginner with Linux (Mandrake 9.1) and try to run my own local web server. Apache 1.3.27 et PHP 4.3.3 are OK. The problem is MySQL... I tried...
2
by: Asad Khan | last post by:
Hello, I was using MySQL till a few days ago just fine. Now everytime I try to run it using mysql.exe, I get the following error: "can't connect to mysql server 'localhost' (10061)" What...
0
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
3
by: Saqib Ali | last post by:
I have set up MySQL on my machine and can successfully use it. However, I'm trying to set up TOra so that I can browse the databases effectively. I'm having lots of trouble trying to get TOra to...
5
by: MLH | last post by:
I'm supposed to set a password for the MySQL root user. The output of mysql_install_db instructed me to run the following commands... /usr/bin/mysqladmin -u root -h appserver password mynwewpasswd...
4
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using...
3
by: Nick | last post by:
hi, all I have a red hat 9 and looks like it had mysql 3.2.54 installed before, but, actually not, i can not find the install folder and I can not uninstall it. So I am trying to install/upgrade...
5
by: news.telia.net | last post by:
Hi! I have a question. I have installed php and mysql on an apache-server on windows and I can't connect to the server. I tried to create a database (since I am trying to learn howto). My...
15
by: rajbala | last post by:
hi all, I got the error like $ mysqladmin -h localhost -u root -p create bedrock Enter password: ****** mysqladmin: connect to server at 'localhost' failed error: 'Access denied for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.