Database server

Howto: Backup and Restore a database

You need to use the “mysqldump” command to backup a Mysql database. Backup/Dump a Mysql database on a Linux Or Linux/cPanel server: root@host [~]# mysqldump /var/lib/mysql/dbname > dbname.sql Restore the .sql file in a database: root@host [~]# mysql /var/lib/mysql/dbname < /path/to/filename.sql Backup/Dump a Mysql database on a Linux/Plesk server: root@host […]

Enable MySQL Query Log File

MySQL has built-in functionality that allows you to log SQL queries to a file , You can enable the full SQL queries logs to a file or only slow running queries log.  It is easy for us to troubleshoot/ debug the sql statement if SQL queries log enable , The […]

Linux HugeTLBfs: Improve MySQL Database Application Performance

Applications that perform a lot of memory accesses (several GBs) may obtain performance improvements by using large pages due to reduced Translation Lookaside Buffer (TLB) misses. HugeTLBfs is memory management feature offered in Linux kernel, which is valuable for applications that use a large virtual address space. It is especially […]

HOW-TO: Automatically Backup a MS SQL Server Database

I am using Microsoft SQL Server 2008 Express but you should be able to use these instructions for all versions of Microsoft SQL Server 2005 and Microsoft SQL Server 2008. In my case, the database files are located in the following directory: CODE C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA As you may […]

Linux: Iptables # 20 Allow ORACLE server incoming request?

Oracle is powerful enterprise class database server and by default it listen on TCP port 1521. Following iptable rules allows incoming client request (open port 1521) for server IP address 202.54.1.20 : iptables -A INPUT -p tcp -s 0/0 –sport 1024:65535 -d 202.54.1.20 –dport 1521 -m state –state NEW,ESTABLISHED -j […]

MySQL Error: Unknown table engine ‘InnoDB’

Error: Unknown table engine ‘InnoDB’ What happened ? I edited the file /etc/mysql/my.cnf by adding these lines: innodb_file_per_table innodb_buffer_pool_size=12G innodb_additional_mem_pool_size=20M innodb_flush_method=O_DIRECT Then I restarted mysql and after that I noted the website was not working correctly due an error in the mysql related to the innodb engine not found. So […]

mysqldump: Got error: 1045: Access denied for user

Today working on a client project, a shell script which uses MySQL to dump the database, has got me into this error mysqldump: Got error: 1045: Access denied for user   I was typically amazed getting this error because all my configurations were correct. I have created proper users to […]