search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Hosting & IIS7 | No Comment | 2,623 views | 27/12/2011 09:43

If you need to move your MySQL database from one server to another, you can use the following codes.

Dump:

mysqldump -u root -pPASSWORD DatabaseName > dbbackup.sql

Import:

mysql -u root -pPASSWORD DatabaseName < dbbackup.sql

You can do this process live.


Posted in Linux Server | No Comment | 2,326 views | 27/12/2011 09:33

You can create MySQL database and user via command line.

1
2
3
4
CREATE DATABASE dbname;
CREATE USER 'dbusername'@'localhost';
SET PASSWORD FOR 'dbusername'@'localhost' = PASSWORD('PASSWORD');
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES,REFERENCES ON dbname.* TO `dbusername`@`localhost` WITH GRANT OPTION;

That gives only localhost grant on MySQL server.


Posted in Linux Server | No Comment | 2,347 views | 27/12/2011 09:27

You can transfer data between two linux servers directly via SCP.

scp -r root@10.10.10.2:/var/www/html/production/common /var/www/html/production

It transfer common directory from 10.10.10.2 to under production directory.


Posted in Linux Server | No Comment | 2,370 views | 27/12/2011 09:21

You can mount NFS share on a Linux Server with following commands:

mount 10.10.10.2:/NFSName  /var/www/html

After that, you should also add that to fstab.

1
2
nano /etc/fstab
10.10.10.2:/NFSName /var/www/html nfs noacl,noatime,nodiratime,rsize=65536,wsize=65536,tcp 0 0

Now you can see NFS share in /var/www/html.


Posted in Hosting & IIS7 | No Comment | 10,661 views | 27/12/2011 09:15

There is no quick way to drop all tables of a MySQL database. You can just drop the database instead. But if you just want to drop all tables, you can use following codes.

mysql -u root -pPASSWORD DatabaseName -e "show tables" | grep -v Tables_in | grep -v "+" | \gawk '{print "drop table " $1 ";"}' | mysql -u root -pPASSWORD DatabaseName

I found the code from another website but it was for password-less MySQL servers. I added password authentication.


Posted in Hosting & IIS7 | 2 Comments | 59,913 views | 26/12/2011 15:59

If you want to see arp table of Fortigate,

1. Login to Fortigate via SSH.

2. Go into VDOM (if you have)

config VDOM
edit CustomerVDOM01

3. Use the following command to see arp table.

get system arp

Have fun!


Posted in Virtual Machine Manager, Windows Powershell | 1 Comment | 3,221 views | 20/12/2011 21:41

If you have a public Hyper-V Cloud and use SCVMM, your customers can install Linux VM and install Hyper-V LIS v3.1 on it, there is nothing you can do to stop them. If they install it, you will not be able to use SCVMM due to LIS v3.1 bug.

System.ArgumentException: Version string portion was too short or too long.
at System.Version..ctor(String version)
at Microsoft.Carmine.ViridianImplementation.VirVMIntegrationService.PopulateKVPElements()

There are 2 options to prevent this.
1) You can provision all new virtual machines without Data Exchange offer.
2) You can disable Data Exchange offer only from Linux VMs to prevent that kind of problem.

If you have 0 – 50 VMs, it’s easy to deal with. But if you are a large Cloud provider, you can’t do it manually, you need scripting. So if you execute this command on SCVMM Powershell Interface, it’ll disable Data Exchange offer on all Linux VMs and save your SCVMM.

Get-VM * | where {$_.OperatingSystem -notlike "*Windows*"} | Set-VM -EnableDataExchange $false

As you see, it just looks for non-Windows machines and disable their Data Exchange offer. Good luck!