CTRL + WINDOWS KEY + C
MySQL MariaDB export and import database
# Export
mysqldump -u [username] -p[password] [database_name] > [dumpfilename.sql]
# Import
mysql -u [username] -p[password] [database_name] < [dumpfilename.sql]
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
Copy files and folders over SSH
# scp -r /path/local/dir user@remotehostip:/path/remote/dir
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
Enable LACP on trunk on HP ProCurve 5406R zl2
# trunk F14,F15,F16 Trk1 LACP
Enable jumbo frames on HP ProCurve 5406R zl2
Logon to CLI
# configure
List all VLAN:s.
# show vlans
enable jumbo on vlan id.
# vlan <ID#> jumbo
example: # vlan 500 jumbo
Check if jumbo are enable on VLAN 500.
# show vlans
Save config
# write memory
Converte Office 365 mailbox to shared mailbox
Connect to Office 365 via PowerShell
Set-Mailbox mailboxname@company.com -Type shared
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