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

# service mysql start

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

# nano /etc/mysql/my.cnf

I removed the line

# 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–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/ /etc/nginx/sites-enabled/
# sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

Import a mysql database from terminal

mysql -u username -ppassword databasename < filename.sql

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


Connect to Office 365 via PowerShell

1. Allowing PowerShell executing scripts:

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

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

1 2 3 11