Sebastian Mogilowskis Blog

Just another blog about administration, linux and other stuff


Reset MySQL Root Password

Quick tutorial to reset the root password of an MySQL server: (I know there are a lot of howtos out there, i make a documentation here for myself :-)) First stop the MySQL server: /etc/init.d/mysql stop Now start the server in “safe mode” without password and network: mysqld_safe –skip-grant-tables –skip-networking You can login to the […]


MySQL Workbench on Ubuntu

Install MySQL Workbench on Ubuntu: 1. Download the Community Edition Download the latest release from the MySQL Website. I used the 64-Bit Debian Paket for Ubuntu 9.04 it works on Jaunty (9.04) and on Karmic (9.10). 2. Installation sudo dpkg -i mysql-workbench-oss-5.1.18-1ubu904-amd64.deb 3. Use it Now you can start MySQL Workbench via your menu (Development […]

, , , ,

MySQL command line import of file with UTF-8 encoding

A Post-It note for me … Importing an UTF-8 encoded MySQL Database export file with MySQL command line interface: mysql -D databasename -h hostname -p -u db_username –default_character_set utf8 < sqlfile.sql If you don’t add the “–default_character_set utf8” flag you will get very funny characters in your database 🙂

, , , ,

Greylisting with sqlgrey, postfix and mysql on Debian Lenny

This article describes howto setup sqlgrey with postfix and mysql on Debian Lenny. The normal graylisting with postgrey store the whitelist in a berkeley database which needs to be replicated on a mailserver cluster. With sqlgrey you can do that replication with a mysql database. First create a Database “sqlgrey” with an user “sqlgrey” on […]

, , , , , , , , ,

Authenticate ejabberd with an mysql database

This is a small script to authenticate Jabber users with an external MySQL database. You can free define table and columns for username and password in the settings part of the script. The password should be stored with the ENCRYPT() function in the database. First edit the Jabber configuration file (\etc\ejabberd\ejabberd.conf) and change the authentication […]

, , , , ,

Log Apache2 access log into a MySQL database on Debian Lenny

This article describes how you can log your apache access log entries into a MySQL database. You need a installed and configurated Apache2 webserver and MySQL server. Installation: On the webserver: aptitude install libapache2-mod-log-sql-mysql a2enmod unique_id On the database server: Create a new database “apachelogs” and a user for this database. Configurate a virtual host: […]

, , , , , , , ,