Source: nixCraft
I‘m a new Ubuntu Linux user and my cloud hosting company installed MySQL server by default. I need to remove it and delete it from my server as I have no use of MySQL server. How can I uninstall MySQL on a Ubuntu based systems?
Typically following Mysql packages are installed on the Debian or Ubuntu Linux systems:
- mysql-client – The latest version of MySQL database client.
- mysql-server – The latest version of MySQL database server.
- mysql-common – MySQL database common files.
How do I uninstall Mysql server?
Just use the apt-get command as follows remove both MySQL server and client in Ubuntu Linux:
sudo apt-get --purge remove mysql-client mysql-server mysql-common
sudo apt-get autoremove
Sample outputs (pay attention to package names):
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-31-virtual linux-headers-3.2.0-31
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
libdbd-mysql-perl* libmysqlclient18* mysql-client* mysql-client-5.5* mysql-common* mysql-server*
mysql-server-5.5*
0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
After this operation, 67.5 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 105097 files and directories currently installed.)
Removing mysql-server ...
Removing mysql-server-5.5 ...
mysql stop/waiting
Purging configuration files for mysql-server-5.5 ...
Removing mysql-client ...
Removing mysql-client-5.5 ...
Removing libdbd-mysql-perl ...
Removing libmysqlclient18 ...
Purging configuration files for libmysqlclient18 ...
Removing mysql-common ...
Purging configuration files for mysql-common ...
dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed.
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Delete /etc/mysql/ directory using rm command:
$ sudo rm -rf /etc/mysql/
Understanding apt-get command options
- --purge : Remove given packages and config files.
- remove : Uninstall packages.
- autoremove : Force to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
Using the same password on different servers allows attackers to access your accounts if cracker manage to steal your password from a less secure server. This is true for online website accounts too. So solution is to create unique passwords for server accounts like your email, sftp and ssh accounts. General guideline to create a strong and unique password is as follows:
Creating a strong and unique password for Linux or Unix-like systems
- Create a password with mix of numbers, special symbols, and alphabets.
- Make sure your password is hard to guess. You can use tool such as makepasswd to create hard to guess password.
- Do not use simple words like «
password« , « 123456« , « 123abc » or « qwerty« .
- Use a unique password for all your server accounts.
- A minimum password length of 12 to 14 characters should be used. See how to configure CentOS / RHEL / Fedora Linux based server password quality requirements.
- Generating passwords randomly where feasible. You can do this with a simple shell scriptfunction.
- If possible use two-factor authentication.
- Use pam_crack to ensure strong passwords and to check passwords against a dictionary attack.
But, how do you test the effectiveness of a password in resisting guessing and brute-force attacks under Linux? The answer is simple use cracklib-check command.
Install cracklib on a Linux based system
Type the following yum command to install on RHEL and friends:
# yum install cracklib
Type the following apt-get command to install on Debian/Ubuntu and friends:
# apt-get install libcrack2
Lire la suite…
On ne le répétera jamais assez : faites des sauvegardes ! Et non, ça n’est pas compliqué, oui il existe des dizaines et des dizaines de solutions possibles, donc vous n’avez pas d’excuse pour ne pas le faire.

Si vous utilisez WordPress, vous avez peut-être déjà installé l’extension BackWPUp qui fonctionne à merveille. Si ça n’est pas le cas, ou si vous souhaitez sauvegarder d’autres projets en même temps, je vous propose ce petit script de sauvegarde en shell (pour Ubuntu par exemple) qui vous permettra de :
- sauvegarder tous les fichiers d’un répertoire ;
- mettre à jour votre répertoire à partir d’un serveur distant ;
- créer un
dump de vos bases de données, une par une ;
- mettre à jour vos bases de de données à partir d’un serveur distant ;
- créer une archive gzippée de votre sauvegarde.
Et tout ça en moins de 50 lignes, commentaires compris.
Ainsi vous n’aurez qu’à planifier un lancement de ce script à la fréquence qui vous convient pour ne pas avoir à vous soucier de vos backups. Lire la suite…
POSIX Access Control Lists (ACLs) are more fine-grained access rights for files and directories. An ACL consists of entries specifying access permissions on an associated object. ACLs can be configured per user, per group or via the effective rights mask.
These permissions apply to an individual user or a group, and use the same as rwxfound in regular permissions.
For an explanation of rwx, see FilePermissions
Enabling ACLs in the Filesystem
Before beginning to work with ACLs the file system must be mounted with ACLs turned on. This can be done in /etc/fstab for the changes to be permanent.
Lire la suite…