Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mysqladmin: connect to server at 'ubuntu.satimis.com' failed
error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 111'
3306 is the default port that mysql uses. According to your ps listing it is what your machine uses.
Please double check that the mysql server is running. And try the telnet command locally on the same machine. If you do it remotely you need to check the firewall settings.
The bind address has a different meaning here. This just means that the server is connected to a socket on localhost. That is normal.
I think that the mysql log in in the /var/lib/mysql/ directory.
3306 is the default port that mysql uses. According to your ps listing it is what your machine uses.
Noted with thanks.
Quote:
Please double check that the mysql server is running.
$ sudo /etc/init.d/mysql status
Code:
* /usr/bin/mysqladmin Ver 8.41 Distrib 5.0.38, for pc-linux-gnu on x86_64
Copyright (C) 2000-2006 MySQL 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 5.0.38-Ubuntu_0ubuntu1.1-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 10 min 24 sec
Threads: 1 Questions: 136 Slow queries: 0 Opens: 132 Flush tables: 1 Open tables: 17 Queries per second avg: 0.218
Please advise if you need me to run other commands for checking mysql status.
Quote:
And try the telnet command locally on the same machine. If you do it remotely you need to check the firewall settings.
I tried telnet on the same machine.
Tried again on the same machine with firewall stopped.
$ sudo iptables -F
No complaint.
$ telnet ubuntu.xyz.com 3306
Code:
Trying 127.0.1.1...
telnet: Unable to connect to remote host: Connection refused
$ telnet localhost 3306
Code:
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
Connection closed by foreign host.
Quote:
I think that the mysql log in in the /var/lib/mysql/ directory.
$ ls /var/lib/mysql
Code:
debian-5.0.flag ibdata1 ib_logfile0 ib_logfile1 mysql mysql_upgrade_info
My mysql log is in /var/lib/mysql and not /var/lib/mysql/mysql. The latter is where the tables are stored.
Did you try to log into mysql either without the -h option or using "-h localhost"? That is the one that may work and if you can access it that way, you can add your hostname and a regular user.
Use, "mysql -u root", if you haven't added a password for root;
mysql -u root -p
<password>
otherwise.
---
Quote:
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
This indicates that using localhost at least that the connection isn't rejected outright.
Could you check if /etc/hosts.allow or /etc/hosts.deny are causing a problem.
Also check your /etc/hosts file. I've seen where "localhost" uses an IPV6 type address near the end of the file. Check that the first uncommented line is "127.0.0.1 localhost". If not you could have problems it you edit /etc/hosts.allow or /etc/hosts.deny.
My mysql log is in /var/lib/mysql and not /var/lib/mysql/mysql. The latter is where the tables are stored.
Did you try to log into mysql either without the -h option or using "-h localhost"? That is the one that may work and if you can access it that way, you can add your hostname and a regular user.
Use, "mysql -u root", if you haven't added a password for root;
mysql -u root -p
<password>
otherwise.
I'm trying to find mysql log file in order to discover the cause of problem in running "mysqladmin -h ubuntu.xyz.com root password myrootsqlpassword"
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.0.38-Ubuntu_0ubuntu1.1-log Ubuntu 7.04
distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SHOW mysql LOG FILES;
ERROR 1064 (42000): You have an error in your SQL
syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'mysql LOG
FILES' at line 1
Read "man mysql". The syntax is correct. It generates another problem. I can't figure out how to correct it. Any advice? TIA.
# find / -name mysql.log
Code:
/var/log/mysql.log
But it is an empty file;
# cat /var/log/mysql.log
No printout
Quote:
This indicates that using localhost at least that the connection isn't rejected outright.
Could you check if /etc/hosts.allow or /etc/hosts.deny are causing a problem.
Also check your /etc/hosts file. I've seen where "localhost" uses an IPV6 type address near the end of the file. Check that the first uncommented line is "127.0.0.1 localhost". If not you could have problems it you edit /etc/hosts.allow or /etc/hosts.deny.
$ cat /etc/hosts.allow
Code:
sshd: 127.0.0.1
# Domain
sshd: .xyz.com
# Pacific from home
sshd: *.myISP.com
sshd sshd1 sshd2 : ALL : ALLOW
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.