Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- During the tests for Nextcloud issues, I tried and installed MariaDB + new phpMyAdmin successfully. I am posting the updated instructions here, feel free to check and update your guide .
- As of 27/9/2018, the successful combination is MariaDB 10.2.17 and phpMyAdmin 4.8.2.
- #Get necessary packages for both programs (phpmyadmin need new ctype package)
- opkg install mariadb-server mariadb-server-extra mariadb-client mariadb-client-extra php7-mod-mysqli php7-mod-mbstring php7-mod-json php7-mod-session php7-mod-ctype
- #Edit 2 lines in /opt/etc/mysql/my.cnf
- user = admin #default superuser of mysql is "root", change this to match the one of the router to allow create basic databases
- bind-address = 0.0.0.0 #to enable TCP/IP connection mode of mysql instead of socket mode, some even said to comment this line out
- #Continue to run in terminal:
- mysql_install_db --force
- /opt/etc/init.d/S70mysqld restart
- /opt/bin/mysqladmin -u root password your_desired_mysql_password #yes, it still keeps its superuser "root"
- #Connect to mysql daemon (also MariaDB) as "root" user to setup some basic things. It is said that some programs would no longer allow "root" user, so we may need to create another super user that has all root/super permissions:
- mysql -u root -p
- # '%' is connection from any IPs, remote machines..., localhost for local machine
- MariaDB> CREATE USER 'new-super-user'@'%' IDENTIFIED BY 'password';
- MariaDB> GRANT ALL PRIVILEGES ON *.* TO 'new-super-user'@'%' WITH GRANT OPTION;
- MariaDB> FLUSH PRIVILEGES;
- #you may want to create a database for Nextcloud/Owncloud/Wordpress...:
- MariaDB> CREATE DATABASE your-db-name;
- #exit mysql
- MariaDB> exit;
- #Important: if you don't disable anonymous login mode, you can't connect your created users to MariaDB-mysql daemon with passwords (got Access Denied) but you can *without* passwords (i.e. just enter to provide blank passwords!). By defaults, phpMyAdmin doesn't allow anonymous login. So, with that reason, and for security, obviously we should disable anonymous mode via this command. It would allow us to set other security settings too:
- /opt/bin/mysql_secure_installation
- #Commands to install the new phpMyAdmin:
- cd /opt/share/www/
- wget https://files.phpmyadmin.net/phpMyAdmin/4.8.2/phpMyAdmin-4.8.2-all-languages.zip --no-check-certificate
- unzip phpMyAdmin-4.8.2-all-languages.zip
- mv ./phpMyAdmin-4.8.2-all-languages ./phpmyadmin
- rm ./phpMyAdmin-4.8.2-all-languages.zip
- cp /opt/share/www/phpmyadmin/config.sample.inc.php /opt/share/www/phpmyadmin/config.inc.php
- chmod 644 /opt/share/www/phpmyadmin/config.inc.php
- sed -i 's/localhost/127.0.0.1/g' "/opt/share/www/phpmyadmin/config.inc.php"
- #You might need to add the port to iptables. (Default MariaDB port: 3306)
- iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
- /opt/etc/init.d/S80lighttpd restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement