Termux-packages: Package request: mariadb/mysql

Created on 17 Apr 2016  路  22Comments  路  Source: termux/termux-packages

Hello, now that we have a nice support for web - lighttpd + php, would it be possible to add mariadb/mysql?

package request

Most helpful comment

@nayanbanik you have to execute mysql_install_db first before running it, and then run it with mysqld_safe --datadir="your default data dir" and run mysql_secure_install

All 22 comments

Hi, I am reopening this issue. Package requests will now be labeled and tracked as an issue.

I'd love to see this too; I might even be able to help as I have had MySQL on arm before. Nginx and lighthttpd...I believe as well.

Well...I've been trying to find a way to build this but the dependency resolution is really slowing me down. I'll come back if I get lucky.

@kaiof there's a disabled mariadb package in the repo if you don't want to start from scratch. It has an obscure bug which occurs when starting it. Maybe it is related to the hacks used to build it. Its a nightmare to debug.

@vishalbiswas thanks for the pointer; I'd actually started down the MySQL path, saw all the needed packages and went a little simpler...building PHP 7 in a CentOS arm container, because it comes with a native driver (and I figured start small)--to connect to a MariaDB apk on Google Play. After getting around "dlopen failed: empty/missing DT_HASH" (with LDFLAGS; needs hash-style=sysv) the biggest hitch has actually been libraries, despite completing a "I thought this was static" compile.

I am getting that this may be a 'good luck' scenario, but it's nice to have another option.

Should be closed now

A mariadb package is now available for all arches thanks to @vishalbiswas!

Now this is great! Thank you, guys!

I was trying to play with Codigniter but stucked on opening the mysql database.

$ mysql ci
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/data/data/com.termux/files/usr/tmp/mysqld.sock' (2)

Kindly check this issue :/

@nayanbanik mysql server is running?

Yes :(

@nayanbanik on your device? can I get the log output of mariadb during your trial?

$mysql ci
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/data/data/com.termux/files/usr/tmp/mysqld.sock' (2)
$ mysqld
2017-07-16 23:51:44 3049065956 [Note] mysqld (mysqld 10.2.6-MariaDB) starting as process 14358 ...
2017-07-16 23:51:44 3049065956 [Warning] Changed limits: max_open_files: 1024 max_connections: 151 table_cache: 431
2017-07-16 23:51:44 3049065956 [Warning] Can't create test file /data/data/com.termux/files/usr/var/lib/mysql/localhost.lower-test
mysqld: Can't change dir to '/data/data/com.termux/files/usr/var/lib/mysql/' (Errcode: 2 "No such file or directory")
2017-07-16 23:51:44 3049065956 [ERROR] Aborting

@nayanbanik you have to execute mysql_install_db first before running it, and then run it with mysqld_safe --datadir="your default data dir" and run mysql_secure_install

@nayanbanik I have updated mariadb with auto setup. Now just update to the latest version and it will be good to go

It didnt work...@bluejedi.. command not found

It didnt work...@bluejedi.. command not found.

I guess it worked... kisses

@vishalbiswas thanks for you effort :)

@bluejedi it didn't work this timw

Hi... i installed mariadb and ran mysqld_safe -u root & in termux but i got this error

node app
server started at localhost:3000
{ Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'myusername'@'localhost' (using password: YES)
at Handshake.Sequence._packetToError (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
at Handshake.ErrorPacket (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/sequences/Handshake.js:130:18)
at Protocol._parsePacket (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/Protocol.js:279:23)
at Parser.write (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket. (/data/data/com.termux/files/home/test/node_modules/mysql/lib/Connection.js:103:28)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
--------------------
at Protocol._enqueue (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/data/data/com.termux/files/home/test/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/data/data/com.termux/files/home/test/node_modules/mysql/lib/Connection.js:130:18)
at Object. (/data/dat

Getting this when i run

$mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/data/data/com.termux/files/usr/tmp/mysqld.sock' (2)

@Adarshreddyash make sure mysqld is running. Then run mysql -u root -p

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adit picture adit  路  3Comments

Cyb3rD3m0n picture Cyb3rD3m0n  路  3Comments

thurask picture thurask  路  3Comments

roalyr picture roalyr  路  3Comments

am11 picture am11  路  3Comments