MySQL and NoSQL Notes

MySQL Clustering Solutions: MySQL ClusterGalera Cluster

Innotop, a non GUI real time performance monitoring tool: tutorial

NoSQL Products Comparision

Advertisements

MySQL: Remote Access

Tasks:
Open port 3306 for TCP

sudo /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
sudo /sbin/iptables-save

create user for remote access and grant all the privileges

create user 'root'@'%' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES on "." TO 'root'@'%' WITH GRANT OPTION;
flush PRIVILEDGES;

bind IP address to mysql

vim /etc/mysql/my.cnf
-bind-address = 127.0.0.1
+bind-address = 10.149.2.116


restart mysql

sudo service mysql restart

MySQL on Ubuntu: Access Denied?

Install MySQL on Ubuntu is very straightforward:

apt-get install mysql-server; apt-get install mysql-client

However, by default there is no way to connect to it using root. debian-sys-maint is the usable super user here. The password for debian-sys-maint is explicitly listed at /etc/mysql/debian.cnf. This means “mysql -u debian-sys-maint -p” with the corresponding passwd is the only access here to mysql server. Next, change the passwd for root by “update user set password=password(‘yourpassword’) where user=’root'”

I did “sudo service mysql stop” and “sudo mysqld –skip-grant-tables” beforehand as well. Not in the mood to check if this step is necessary.