I always use PostgreSQL for every project in my company, both in development and production. Recently, I have to use MySQL (version 5.1.36) in my new project because the client uses MySQL for deployment. The first step I have to do is to setup MySQL on my laptop for the project development, I'm using ArchLinux so the steps are straight-forward:
I open up MySQL Administrator and connect to the new 'shiny' server with the user 'root', everything is fine. I create a new user, then a new catalog and grant all the neccessary permissions for the new user to use the new catalog. I fire up Tomcat which contains my web application (Spring + Hibernate), the application creates a connection pool (c3p0) at startup to improve performance, but it failed with the error message Connection refused". Hmm...strange! Googling for a while, I was suggested to put this into my /etc/hosts.allow the following line:
Gotchas solved.
PS: I'm totally new to MySQL, this is my way I made my application work with MySQL, if you have a better setup, I'm glad to know :)
- Install MySQL with the pacman: pacman -S mysql
- Start it up: /etc/rc.d/mysqld start
- Set the root password: /usr/bin/mysqladmin -u root password 's3cr3t'
- Execute the recommended script to secure the new MySQL installation. Basically, the script will remove the test database, the anonymous users and only allow connection from localhost: /usr/bin/mysql_secure_installation
I open up MySQL Administrator and connect to the new 'shiny' server with the user 'root', everything is fine. I create a new user, then a new catalog and grant all the neccessary permissions for the new user to use the new catalog. I fire up Tomcat which contains my web application (Spring + Hibernate), the application creates a connection pool (c3p0) at startup to improve performance, but it failed with the error message Connection refused". Hmm...strange! Googling for a while, I was suggested to put this into my /etc/hosts.allow the following line:
mysqld: 127.0.0.1:ALLOWRestart my web application, now the error message is different Communications link failure .... Open up the configuration of MySQL (/etc/my.cnf), I found out that the skip-networking is on! Here is the documentation about this entry:
# Don't listen on a TCP/IP port at all. This can be a security enhancement,Comment that entry (by adding the # before it) and restart the mysql server. My web application now can startup properly!
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
Gotchas solved.
PS: I'm totally new to MySQL, this is my way I made my application work with MySQL, if you have a better setup, I'm glad to know :)
I'm a "fanboy" of OSS4 since I switched from Fedora to ArchLinux. OSS4 is a great sound module except for... its mixer program, ossxmix:
It's not a GUI, it's a GSDI or Graphical Sound Developer Interface :). I have no idea what the functionality it provides, so my approach to use this kind of application is try-and-see.
Recently, I've upgraded my kernel to 2.6.30.x and the sound on my laptop get distored. I googled for solution many hours without any luck, it's time to solve this by myself. Fire up ossxmix, try-and-see alot of settings and I found this:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAdzBD-VT9wolEBa9sdsnBcG0AA6sbBokpdxM5ot3TZpsRyXmh87OqBw3vwf_zuWOE30M_-fxNrd3dG_TMng2uc3s39tdm7DqWNk6t7fY-RpxclvGC-M6mq5iAwabzpMEoX8hwm7tejzg/s400/screenshot_002.png)
Hope this may save you some time.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNp0R_i89kIc_5sj0WzQi4t9ULTIz483gXFDwXi0-MoEZMwCk8uUeI_rhSJMJ3A9PAFpMiKq5r2MScJTdOKJW4u_WkgUotFvGrxS3UT63K2AHln5GwsC26YVOfYRfUgatNVrV-tkmhu9c/s320/screenshot_001.png)
Recently, I've upgraded my kernel to 2.6.30.x and the sound on my laptop get distored. I googled for solution many hours without any luck, it's time to solve this by myself. Fire up ossxmix, try-and-see alot of settings and I found this:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAdzBD-VT9wolEBa9sdsnBcG0AA6sbBokpdxM5ot3TZpsRyXmh87OqBw3vwf_zuWOE30M_-fxNrd3dG_TMng2uc3s39tdm7DqWNk6t7fY-RpxclvGC-M6mq5iAwabzpMEoX8hwm7tejzg/s400/screenshot_002.png)
Hope this may save you some time.