ChatGPT prompt - Guide me through installing mysql and phpmyadmin on termux
Because official MySQL packages are not maintained for Termux, the easiest and most stable setup is MariaDB (drop-in MySQL replacement)
Set the root password
Create an admin user for phpmyadmin
\e for long queries in editor
;
At first I got the following error trying to log into phpmyadmin
mysqli::real_connect(): (HY000/2002): No such file or directory
Turns out phpMyAdmin is trying to use “localhost socket” instead of TCP
vim phpmyadmin/config.inc.php
change
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Restart everything. This forces TCP instead of socket.
Now that I have a beautiful LAMP stack setup I could try to install wordpress locally on termux.

Comments