Problem starting MySQL MariaDB: InnoDB: Set innodb_force_recovery to ignore this error.

After trying to import a database I had problem starting mysql.

# service mysql start

Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.

# systemctl status mariadb.service

InnoDB: Set innodb_force_recovery to ignore this error.

To be able to delete tables in the database I had imported to I needed to use innodb_force_recovery

# nano /etc/mysql/my.cnf

I added the following line under [mysqld] in my.cnf
innodb_force_recovery=1

# service mysql start

I then logged into PHPmyAdmin and drop the tables in the database.

# nano /etc/mysql/my.cnf

I removed the line
innodb_force_recovery=1

# service mysql restart

Now everything worked. But I have to figure out why the db I tried to import messed up mysql…

Problem with virtual hosts using nginx on on ubuntu

Problem after following this guide https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts–3 virtual hosts didn’t work. All access was going to default root.

I need to create symbolic links of the virtual hosts in sites-available to sites-enabled
# sudo ln -s /etc/nginx/sites-available/headadmin.se /etc/nginx/sites-enabled/headadmin.se
# sudo ln -s /etc/nginx/sites-available/headadmin.net /etc/nginx/sites-enabled/headadmin.net

Import a mysql database from terminal

mysql -u username -ppassword databasename < filename.sql

Example
Username: daniel
Password: 123Headadmin
Database name: my_new_db
Database file name: my_old_db.sql

mysql -u daniel -p123Headadmin my_new_db < my_old_db.sql

Export mailbox to PST Exchange 2007

You must run this from a 32-bit Windows OS (I used Windows 7 Ent. 32-bit) with Exchange Management Tools installed, version Exchange 2007 SP1 or later, (I used Exchange 2007 SP3 with update rollup 13) and Outlook 2003 or Outlook 2007 (I used Outlook 2007 with SP3).

Microsoft Exchange Server 2007 Management Tools (32-Bit) download.

Start Exchange Management Shell (EMS) from the client that is member in the same domain as the exchange server. Your user account must be an Exchange Organization Admin or an Exchange Server Admin on the Exchange server who has the mailboxes you want to export.

Your account must have full mailbox access on the mailboxes you want to export.

Example. anna is the alias for the users mailbox you want to export. danieladmin is your account.
Run this command from EMS:
Add-MailboxPermission -Identity anna -User danieladmin -AccessRights FullAccess

To export annas mailbox:
Export-Mailbox -Identity anna -PSTFolderPath \\fileserver\PSTexport

Links:
blogs.technet.com/b/exchange/archive/2007/04/13/3401913.aspx
technet.microsoft.com/en-us/library/bb266964%28v=exchg.80%29.aspx

Connect to Office 365 via PowerShell

1. Allowing PowerShell executing scripts: http://headadmin.net/?p=172

2. Do this in an elevated PowerShell promt:
$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx

1 2 3 11