473,804 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11519
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.local domain 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.local domain 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_pac ket = 1M
table_cache = 256
sort_buffer_siz e = 1M
read_buffer_siz e = 1M
myisam_sort_buf fer_size = 64M
thread_cache = 8
query_cache_siz e= 16M
# Try number of CPU's*2 for thread_concurre ncy
thread_concurre ncy = 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_pac ket = 1M
table_cache = 256
sort_buffer_siz e = 1M
read_buffer_siz e = 1M
myisam_sort_buf fer_size = 64M
thread_cache = 8
query_cache_siz e= 16M
# Try number of CPU's*2 for thread_concurre ncy
thread_concurre ncy = 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

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

Similar topics

6
3705
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 with the 3.23.56 version and the 4.0.1. Always, I recompiled. I have installed also phpMyAdmin (once agin, in 2 versions) in order to understand what happened. It is able to connect to the database but not to read the data. I tried to "see" my...
2
42880
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 can I do to get rid of this? (What is 10061?)
0
2836
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 Mandrake 9.2 and am reinstalling everything. This thing is kicking my ass and I can't seem to get past it. I could really use some help if anybody has any. Just for reference, this was my primary source for information on installation and...
3
4633
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 work with MySQL. Please take a look at the notes below and please let me know why I'm having trouble and how to fix it..... Thanks -Saqib
5
4318
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 I did. It did not work. Here's the error: /usr/bin/mysqladmin: connect to server at 'appserver' failed error: 'Host 'appserver.crci.com' is not allowed to connect to this MySQL server' Another command I'm supposed to run also resulted in an...
4
2819
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 http://192.168.1.106/~mlh/credifree/index.php the AMP app still thinks the data resides somewhere else. It runs fine - as long as I leave my LAN's external internet connection up. But if I unplug my LAN from the world, my app locks up. Before I...
3
7009
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 to 4.1, but, still can not get it work. Here is what I did: # rpm -Uvh MySQL-server-standard-4.1.14-0.rhel4.i386.rpm warning: MySQL-server-standard-4.1.14-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
5
4573
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 manual said I should write this at the shell: c:\mysql\bin>mysqladmin -u root creare mindb I did this and got this error:
15
43601
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 user 'root'@'localhost' (using password: YES)' $ mysqladmin --no-defaults -u root ver mysqladmin: connect to server at 'localhost' failed
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9166
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.