Tried to update MySQL.... and..... boom

LawsHosting

Verified User
Joined
Sep 13, 2008
Messages
2,418
Location
London UK
I tried upgrading MySQL via CB2 plugin, but it must had stalled, as now it has died.

Luckily its a newish server........ Recompiling wont work, nor the scripts/mysql.sh....... It just tries to shut down/start up when attempting a mysql_force_compile=yes

What I found is, when it downloads the //files.directadmin.com/services/custombuild/mysql/5.7/5.7.24/mysql-5.7.24.tar.gz, it tries to execute the configure script, but it's not in the tar, configure.cmake is instead.
Code:
./build mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/home/mysql/mysql.sock' (2)
Attempting to compile a package from source...
Extracting mysql-5.7.24.tar.gz ...
./build: line 7772: ./configure: No such file or directory
Done. Making mysql-5.7.24...
Trying to make mysql-5.7.24...
make: *** No targets specified and no makefile found.  Stop.

How do I get rid of mysql and start again, without nuking everything?

I wished I left it alone, or upgraded via bash.
 
This doesn't work either: https://help.directadmin.com/item.php?id=45

It doesn't set the MYSQLD_OPTS="--skip-grant-tables", it keeps giving access denied

and if I use the mysql.sh method, it gives

./mysql.sh: line 138: scripts/mysql_install_db: No such file or directory


I think the mysql.sh script is borked or doing it wrong, it doesn't even attempt to re-download the gz file..... Bare in mind, I use mysql, not mariadb
 
Last edited:
Ok, so, I had to define the socket path/file in /etc/my.cnf then /scripts/mysql.sh worked......... Now it is working, and DA can connect using da_admin

However
Code:
Waiting for mysqld to start....Setting MySQL Root Password...
Setting DirectAdmin user and password...
Securing installation...
[B]./mysql.sh: line 235: /usr/bin/mysql: No such file or directory[/B]
 
Hi Peter,

Sorry to hear you had this issue.
Can you confirm which OS version you're running on?
Just need to know which binaries are missing, if any.

I know MySQL 5.6 did not have binaries available for Debian (they didn't exist in the past when I first added the puller scripts, so it wasn't anything new), but added them today:
https://forum.directadmin.com/showthread.php?t=57169&p=292317#post292317

but my reply also mentions a possible new method of skipping the filesX mirrors altogether, and trying straight from dev.mysql, for any OS, any version (to be confirmed if the idea works)
We'll see if that works, as I would agree that the MySQL/MariaDB compile times are unreasonably long.

MySQL 5.7 does have Debian binaries.. always did, eg:
http://files1.directadmin.com/servi...it/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
so if that is true, I would suspect it might be a rsync order issue (although the fallback files server should have provided the file), in which case the direct dev.mysql pull would solve that as well.

Martynas is also adding a validation check on the downloaded file, which should also prevent this.

If you would like us to check the box for you, please create a ticket and we can clear that up.

John
 
It's a Debian 8 VM.....

It did really turn out to be the socket location, if I just had a blank /etc/my.cnf, when I did any mysql -u blah, it wanted the socket in /tmp/, which is a bit weird considering the systemd mysqld.service defines the path when it's run (--socket=/usr/local/mysql/data/mysql.sock).... :confused:

My my.cnf had the wrong path initially, so I removed the file just to see, that's when it wanted it in /tmp/
 
Last edited:
It's been fixed in CB 2.0 rev. 1953. Thank you for the report!
 
Back
Top