From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) Description of problem: When remote connections are attempted to the mysql server (version 3.23.52) it segfaults and is restarted by safe_mysqld. On the remote side the client complains of 'Lost connection during query'. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.Start the server: /etc/init.d/mysqld start 2.Create an account for remote access 3.From the remote machine try to connect to the server. Actual Results: The server dies and is restarted by safe_mysqld. At any given time only one instance of mysqld remains running. Expected Results: A normal connection. Additional info:
I've the SAME problem. MySQL work with replication and local socket connections, but if i connect from a remote host i get the same error. davidegiunchi (at) libero.it
Verified here. Same problem on a box running the null beta...
An strace of the mysqld process shows that it is segfaulting after setting some socketoptions... fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 accept(3, {sin_family=AF_INET, sin_port=htons(45766), sin_addr=inet_addr("193.197.10.99")}}, [16]) = 7 fcntl64(3, F_SETFL, O_RDWR) = 0 getsockname(7, {sin_family=AF_INET, sin_port=htons(3306), sin_addr=inet_addr("217.67.231.219")}}, [16]) = 0 fcntl64(7, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0 setsockopt(7, SOL_IP, IP_TOS, [8], 4) = 0 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0 time(NULL) = 1033923183 rt_sigprocmask(SIG_SETMASK, NULL, [HUP QUIT PIPE TERM TSTP RTMIN], 8) = 0 write(6, "\200\300\2@\0\0\0\0\340\2547\0100\377\16\10\220o>\10\5"..., 148) = 148 rt_sigprocmask(SIG_SETMASK, NULL, [HUP QUIT PIPE TERM TSTP RTMIN], 8) = 0 rt_sigsuspend([HUP QUIT PIPE TERM TSTP] <unfinished ...> --- SIGRTMIN (Real-time signal 0) --- <... rt_sigsuspend resumed> ) = -1 EINTR (Interrupted system call) sigreturn() = ? (mask now [HUP QUIT PIPE TERM TSTP RTMIN]) select(5, [3 4], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted) --- SIGSEGV (Segmentation fault) ---
I have the same problem connecting from a remote server.
Same here. Worked fine under 7.x but after upgrade to 8.0 remote connections to mysqld crash the daemon with a segfault. Downgrading mysqld to the version used in 7.3 did NOT help and the same problem was observed with remote connections.
mysqld does work when started with the parameter --skip-name-resolve or the "skip-name-resolv" entry is added to the mysqld part of /etc/my.cnf. Thus I'd assume the problem is in the shared resolver libs, as it makes no difference if a known good mysqld from RH 7.3 is installed. Problem with the above mentioned workaround is that the GRANT tables in mysqld only work with IPs and not with hostnames anymore. Thus users have to be allowed access with numerical IPs.
Thought I'd change the priority to high: MySQL is still popular with many admins but RedHat has seems to have given it a back seat (PostGRE gets installed if you select the default 'SQL server' in the installer). Anyhow, this is apparently a glibc problem... something to do with the resolver function. It seems downgrading to the version prior to the glibc-2.2.5- 40 'fixes' the issue. Checkout the bug #75297.
Connecting though a ssl-tunnel is possible!
Same problem here. Stock RedHat 8.0 install done from scratch. Besides the 2013 - Lost connection to MySQLserver during query error., I am also getting SQL syntax errors on pages that used to work under RedHat 7.3 (You have an error in your SQL syntax near '' at line 1). I have heard that it may be a query error but these same pages worked fine in the previous version. Any help would be appreciated.
...andreas was correct about the --skip-name-resolve parameter, and that give me an idea... ...I solved the problem adding the ip and hostname of the remote machine to /etc/hosts where mysqld is running. This is strange because DNS resolution is working fine in both server and client computers.
Yes, adding the host to /etc/hosts is another possible workaround. But this does not work well if you get updates from dynamic hosts. Also, AFAIK, the lookup of host from the hosttable is different than doing the same lookup via reverse DNS. This is also the reason why localhost connections work, as localhost is usually defined in /etc/hosts. --- To RedHat: Could we please get a bit of feedback about this? Status is still NEW and we have seen several people commenting about this 2 week old BugReport. Additionally I heard about several people who have this problem on their productive servers now, which is a bad thing [tm].
This problem is even bigger on RedHat 7.3 with the latest glibc installed. The problem don't show up before you restart the mysql-server. This problem can be hard to track down, if you don't restart the mysql deamon several weeks after you updatet your system. Another concern: Shouldn't it be safe to run up2date?
For what it's worth... Updating glibc and nscd to a version from rawhide solved the problem on my boxes. Version from rawhide that I got was 2.3-2.
confirmed here. GREAT!
I have recently installed 2 machines with RedHat 8.0 - stock install. On the one machine, connecting remotely worked fine. However, on the 2nd machine, I can't get it to work, and have resorted to using skip-name-resolve instead. I have checked the versions of glibc and they are the same on both machines. The only difference I can think of at the moment is hardware and drivers - one is a P4, the other a P3. The P4 has onboard lan, the P3 has a cheap accton card.
Here's another my.cnf fix that seems to work (under [mysqld]): set-variable=max_allowed_packet=16M set-variable=thread_stack=1M Prasad
I did the last suggested additions to my.cnf and that solved this problem for me. Florus
i'm still having the same problem with remote connection mysqld log 021111 11:34:03 /usr/libexec/mysqld: Normal shutdown 021111 11:34:03 InnoDB: Starting shutdown... A mysqld process already exists at Mon Nov 11 11:34:04 PST 2002 021111 11:34:05 InnoDB: Shutdown completed 021111 11:34:05 /usr/libexec/mysqld: Shutdown Complete 021111 11:34:05 mysqld ended my.cnf mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock set-variable=max_allowed_packet=16M set-variable=thread_stack=1M [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
Hi there, I don't know, if the problem I have has the same reason. I installed redhat 8.0 on a P4 Machine (Dell Inspiron Notebook) with PHP and MYSQL. I also put phpmyadmin on the machine. Calling PHPINFO(); does not show any MySQL support and starting phpmyadmin over the localhost shows errors (Cannot load MySQL extension). After looking in the usr/lib/php4, there's no mysql.so located. Any idea or suggestions ? I'm a linux newbie and its hard for me to find any help on this....
js, you have a different problem. RH comes with MySQL support for PHP, but it's not installed by default. Install the php-mysql-4.2.2-8.0.5 rpm on your system (it's on one of your CDs), restart apache, and you should be all set.
yeap....i had the same problem with both my redhat 8.0 machines...hopefully a bugfix will come asap sinces one of them is the production server.
*** This bug has been marked as a duplicate of 77467 ***
*** Bug 82582 has been marked as a duplicate of this bug. ***