SliTaz SliTaz Forum

You are not logged in.

#1 2017-02-09 12:15:22

rafael
Member
Registered: 2017-02-09
Posts: 2

MySQL pre-install commands failed

The packages mysql and mariadb both show FAILED for the pre-install commands but no further info on what went wrong. After the install I get: ERROR 2002 (HY00): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory").

What's the right way to install mysql package?

Thanks

Offline

#2 2017-02-19 21:11:25

llev
Member
Registered: 2011-12-09
Posts: 568

Re: MySQL pre-install commands failed

[c]tazpkg[/c] is the official way, it should be right ;-)

Look at the receipt: http://cook.slitaz.org/cooker.cgi?receipt=mysql

(also under [c]/var/lib/tazpkg/installed[/c] on your PC if package is installed)

- The maintainer is Pascal, he is active, so he may help you, try mailig him.

- pre_install() is quite simple, I don't see how it could fail...

Offline

#3 2017-02-20 00:55:57

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: MySQL pre-install commands failed

Hi llev,

What "pre-install failed" mean? That tazpkg calls the function pre_install(), and then the exit code of that function isn't zero. Let's look deeper...

[c]pre_install()
{
    # Cleanup old files
    rm -f "$1/usr/libexec/mysql"*
    # Mv config
    [ -f "$1/etc/my.cnf" ] && mv -f "$1/etc/my.cnf" "$1/etc/mysql/my.cnf"
}[/c]
Oh... The last line. It's the short form of the if-then-else conditional operator.

If the condition is true (the file "/etc/my.cnf" exists), then command "mv" executed.

If the condition is false, then nothing happens.

But this conditional operator is the last command in the function, and its exit code is transferred as exit code of the whole function.

So, to summarize this all. If file "/etc/my.cnf" absent, it will show that "pre-install failed".

Sorry, I don't know what this file is for...

Offline

#4 2017-02-20 09:04:56

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: MySQL pre-install commands failed

pre_install fix: http://hg.slitaz.org/wok/rev/bf261b0db903

Offline

#5 2017-02-20 12:33:08

rafael
Member
Registered: 2017-02-09
Posts: 2

Re: MySQL pre-install commands failed

Gonna try that fix, thanks Bellard.

And thanks to everybody that helped, you are all awesome!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.023 seconds, 8 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]