Hardware information

Interesting article can be found here.

In summary, following commands will give you interesting details:

inxi -Fxz
lshw -short
lshw -C cpu
lspci -v -s 00:02.0
dmidecode -t memory
lshw -short -C memory

Upgrade MySQL from 5.1 to 5.5 on CentOS 6.x

Check installed version of mysql

rpm -qa | grep mysql

Enable the remi repository by modifying the enabled flag in the repo file:

vi /etc/yum.repos.d/remi.repo

After that, perform upgrade and verify new version. (several methods included below…)

yum -y update mysql*
rpm -qa | grep mysql
mysql --version
mysql -u root -p


Using PhpMyAdmin to administer a remote server

Imagine the following set-up:

Local machine with Debian 9/10, or Ubuntu, or Linux Mint.

Local machine with MySQL server (which would be MariaDB in this case) and with PhpMyAdmin. One can access http://localhost/phpmyadmin.

In order to access a remote server, we need to do the following:

sudo vi /etc/phpmyadmin/config.inc.php

Add following lines at the end:

$i++;
$cfg['Servers'][$i]['host'] = '10.10.10.11';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'rootpassword';
$cfg['Servers'][$i]['auth_type'] = 'config';

In case you want to provide a default language, add following after the blowfish section:

$cfg['Lang'] = 'en';

(I didn’t see any useful improvement in putting this, just mention it for those that want their server to behave independently of their locale setting.)

On the remote server, you will need to allow the root user to connect and to open the firewall port on 3306. Please modify the network segment from which remote access is allowed and the rootpassword in below script to suit your configuration.

Script for CentOS 6.x

iptables -A INPUT -i eth0 -p tcp -s 192.168.0.0/24 --dport 3306 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 3306 -m state --state ESTABLISHED -j ACCEPT

mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'rootpassword';

In case you want to connect to a remote server with MySQL< 5.5, you will have to do an upgrade to version 5.5. Otherwise, the latest phpMyAdmin won’t connect. See separate post.