Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: TomyTurbos on March 04, 2019, 08:31:21 PM
-
First question:
Does it require mariadb-client in order to actually do something other than start it?
The .info files are not very intuitive, and I haven't been able to get it working. The earlier version, with the client work.
-
Hi TomyTurbos
Looking at the .list file:
http://tinycorelinux.net/10.x/x86/tcz/mariadb-10.3.tcz.list
it appears the client may be included. The list includes:
/usr/local/mysql/bin/mysql
/usr/local/mysql/bin/mysqldump
/usr/local/mysql/bin/mysqldumpslowThe mariadb-client.tcz package may not be compatible with the newer version.
-
Hi TomyTurbos
Looking at the .list file:
http://tinycorelinux.net/10.x/x86/tcz/mariadb-10.3.tcz.list
it appears the client may be included. The list includes:
/usr/local/mysql/bin/mysql
/usr/local/mysql/bin/mysqldump
/usr/local/mysql/bin/mysqldumpslowThe mariadb-client.tcz package may not be compatible with the newer version.
That's what I thought. BUT, after loading mysqld in via /opt/bootsync as
/usr/local/mysql/bin/mysqld_safeas per the instructions, 'mysql' (from the same directory) reports as not found.
It DID work when I installed mariadb and mariadb-client though (and not mariadb10.3).
It's starting to look like andyj made a mistake maybe?
-
Hi TomyTurbos
... 'mysql' (from the same directory) reports as not found. ...
If /usr/local/mysql/bin/ is not part of your path then you need to call it as /usr/local/mysql/bin/mysql.
-
Hi TomyTurbos
... 'mysql' (from the same directory) reports as not found. ...
If /usr/local/mysql/bin/ is not part of your path then you need to call it as /usr/local/mysql/bin/mysql.
Hmm... Seems strange that after cd'ing into that dir (/usr/local/mysql/bin) an explicit path would be necessary.
Nonetheless, entering it as /usr/local/mysql/bin/mysql now results in error while loading shared libraries: libcursesw.so.5 (etc)
-
That will take a little while to fix. The cursed ncurses curse rears it's ugly head again. MariaDB takes two hours to compile.
-
Hi TomyTurbos
Hmm... Seems strange that after cd'ing into that dir (/usr/local/mysql/bin) an explicit path would be necessary.
In Linux, if you are in the directory you can preface the command with ./ like this:
./mysqlerror while loading shared libraries: libcursesw.so.5 (etc)
Maybe it needs ncurses5.tcz ?
-
Hi TomyTurbos
Hmm... Seems strange that after cd'ing into that dir (/usr/local/mysql/bin) an explicit path would be necessary.
In Linux, if you are in the directory you can preface the command with ./ like this:
./mysqlerror while loading shared libraries: libcursesw.so.5 (etc)
Maybe it needs ncurses5.tcz ?
I'll just say that the './' preface seems goofy to me, but if that's the Linux way, so be it.
As for the cursed ncurses, I installed that and now get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock(2)'
I don't know if andyj needs to know this before he spends the next two hours compiling, but at least we're making progress!
Point of interest: My understanding is that it is more conventional to use /var/run as a location for sockets, and more secure than using /tmp. YMMV.
-
In Linux, if you are in the directory you can preface the command with ./ like this:
./mysql
I'll just say that the './' preface seems goofy to me, but if that's the Linux way, so be it.
On the contrary, the ./ has a very specific and helpful meaning. it means in the current working directory. Whereas ../ means the parent directory. If mysql is located outside of the PATH variable simply typing mysql wouldn't be enough to launch it, a path needs to be specified. Rather than specify the full path, you can use ./your_executable instead which provides the path to the executable (if the executable is in the current working directory).
That's a bit of a long winded answer, but you'll figure out soon enough how useful it can be.
:)
-
Did you create and start a database using something like the following?
/usr/local/mysql/scripts/mysql_install_db --no-defaults --basedir=/usr/local/mysql --datadir=/path/to/database/dir
sudo /usr/local/mysql/bin/mysqld_safe --basedir=/usr/local/mysql --datadir=/path/to/database/dir --syslog --user=tc &
The socket is in the default location. It won't exist until the database is started. You can change the location in the config file:
tc@box:/usr/local/mysql/bin$ ./mysql --help
./mysql Ver 15.1 Distrib 10.3.13-MariaDB, for Linux (i686) using readline 5.1
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Usage: ./mysql [OPTIONS] [database]
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysql client client-server client-mariadb
...
-
Did you create and start a database using something like the following?
/usr/local/mysql/scripts/mysql_install_db --no-defaults --basedir=/usr/local/mysql --datadir=/path/to/database/dir
sudo /usr/local/mysql/bin/mysqld_safe --basedir=/usr/local/mysql --datadir=/path/to/database/dir --syslog --user=tc &
The socket is in the default location. It won't exist until the database is started. You can change the location in the config file:
tc@box:/usr/local/mysql/bin$ ./mysql --help
./mysql Ver 15.1 Distrib 10.3.13-MariaDB, for Linux (i686) using readline 5.1
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Usage: ./mysql [OPTIONS] [database]
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The following groups are read: mysql client client-server client-mariadb
...
Cool. I seem to have a grip on this and resolved the problem (I think...). And of course, thanks!
While I have your attention I will just add that if you have not yet repackaged the tcz, mariadb is up to v10.3.13 already. Maybe you can save yourself a step by knowing this.
-
In Linux, if you are in the directory you can preface the command with ./ like this:
./mysql
I'll just say that the './' preface seems goofy to me, but if that's the Linux way, so be it.
On the contrary, the ./ has a very specific and helpful meaning. it means in the current working directory. Whereas ../ means the parent directory. If mysql is located outside of the PATH variable simply typing mysql wouldn't be enough to launch it, a path needs to be specified. Rather than specify the full path, you can use ./your_executable instead which provides the path to the executable (if the executable is in the current working directory).
That's a bit of a long winded answer, but you'll figure out soon enough how useful it can be.
:)
It still seems odd to a person coming from the MicroSquish world where the PWD is pre-pended to the path, but thank you for the explanation. I'll try to remember that in the future.