Enable remote access to your MySQL Database on CentOS 6

Often you’ll need some remote access to your database in order to retrieve or manage data.

This can be set up quite easy.
First step would be to allow the network to access the mysql service. This is done by editing the /etc/my.cnf configuration file.
nano /etc/my.cnf
Now look for the line which contains # skip-networking and uncomment it.
Save the configuration file and restart the mysql service.

service mysqld restart

Now that you just allowed network access to your MySQL server you probably need to assign some credentials for remote access.
First login to your db:

mysql -u root -p mysql

Then you’re ready to create a database:

mysql> CREATE DATABASE database;

create a username for remote access:

mysql> GRANT ALL ON database.* TO user@’host’ IDENTIFIED BY ‘PASSWORD’;

or grant access to an already existing database:

mysql> update database set Host=’′ where Db=’database’;
mysql> update user set Host=’′ where user=’admin’;
Note: to grant access to any host use the wildcard ‘%’ instead of a host name/ host ip.

Setup MySQL server on CentOS 6

I’m going to show you how to easily set up a MySQL server on your CentOS box.

First you need to install the required packages
yum install mysql mysql-server

Then start up your newly installed sql server
service mysqld start
Configure your server by running
Then follow:
Enter current password for root (enter for none): { Press Enter }
Set root password? [Y/n] { Press Y }
New password: { Type your password of choice }
Re-enter new password: { Your password again }
Remove anonymous users? [Y/n] { Press Y }
Disallow root login remotely? [Y/n] { Y is recommended, make other users for remote login}
Remove test database and access to it? [Y/n] { Y if you don’t need any test data }
Reload privilege tables now? [Y/n] { Y to clean up and applay the changes }

All done!  If you’ve completed all of the above steps, your MySQL
installation should now be secure.
Now your basic configuration is ready.

What to do after a fresh installation of Fedora

Ok, so you have successfully installed Fedora on your machine, now you might want to make it ready for your needs so you could use the following for inspiration. I am not going to debate ethical issues of installing / using non-free software so if you don’t agree with some of my recommendations just don’t apply them.

1. Install flash player

Unfortunately a great extent of out today web is still dependent on Flash, although Flash seems to die in the near future you might still need it.

So add the following repositories from adobe:

rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

and for x64

rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Then install the flash player:

yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

2. Enable mp3 support and install all the media codecs

Fedora does not come with out-of-the-box support for mp3 and other popular codecs due to licence issues. If you don’t want to use non-free codecs like gstreamer ugly plugins then you should use VLC to play every media format.
To install VLC:
yum install vlc

To enable codecs support system-wide:
Activate RPM Fusion repository:

yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Then install the ugly plugins:

yum install gstreamer-plugins-*

3. Install skype
If you are a regular skype user you might need it to keep in contact with your friends and family.
Unfortunately skype is 32-bit only application and if you run a 64-bit Fedora you need some 32-bit dependencies in order to run it:
Install the dependecies for 64-bit systems first:

sudo yum -y install libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686 pulseaudio-libs.i686 pulseaudio-libs-glib2.i686 alsa-plugins-pulseaudio.i686

Now you can proceed to skype’s download page and get the latest 32-bit package for Fedora .

4. Install dropbox

Fortunately dropox releases rpm packages for both 32-bit and 64-bit Fedora. All you have to do is head to their website and grab your rpm package

5. Install your favorite software
On my must-have software list is:

6. Update
Do a system update

7. Install 3rd party drivers
If you need to install 3rd party drivers you might want to google for some tutorials on how to do it for your specific driver