Creating MySQL database and user from command line

This serves as my own notes – I always forget the syntax.

Prerequisitements

  • How to deal with UNIX command line programs

Use MySQL command to login to running MySQL instance. If this is on local host you can try

mysql -uroot # no password

or

mysql -uroot -p # asks for password

Use -H option to connect to external MySQL host (on shared hosting).

Then create a new database using CREATE DATABASE command. Here we create a database called joomla.

mysql> create database joomla;
Query OK, 1 row affected (0.00 sec)

And then we create a MySQL user whose access is limited to this database only. In this case we create admin user with admin password. Note that MySQL accepts local connections only by default, so MySQL or this user is not exposed to Internet (and potential attacks).

Username is joomla and password is joomladbpassword.

GRANT ALL ON joomla.* TO 'joomla'@'localhost' identified by 'joomladbpassword';

… and now you can proceed to install Joomla.

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

Paste as plain text in Google Chrome – The most useful hidden feature

Background: you are writing blog post or rich text email in a web browser and you want to include text from other web page. The normal copy-paste functionality copies the styles of the source material, usually messing up your blog post or message.

It doesn’t have to be so.

In Google Chrome web browser, you have Paste as plain text functionality. Just hit CTRL+SHIFT+V for paste as plain text. You don’t need no longer recycle all text through Notepad or other plain text editor.

This functionality is not available through menus, only through this keyboard shortcut.

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+

python.fi – Finland interest group has now web presence

I finally managed to squeeze together some workhours to launch a web site for Python Interest Group Finland.

python.fi

The site is in Finnish as the target audience mostly speaks this ancient mumbling. If you have any updates please follow the insructions on the site to post them.

Our next goal is to organize the second Python event in Finland and/or create a non-profit organization around Python activities here.

The site runs on Google Appengine. All code is licensed under permissive open source licenses and available from Github. Thanks for Hexagon IT for kindly hosting the domain name.

\"\" Subscribe to RSS feed Follow me on Twitter Follow me on Facebook Follow me Google+