HostOnNet Blog

Category Archives: MySQL

How to Backup MySQL Database in cPanel

In this article I’m showing you how easy is to download a database backup of your MySQL database from within cPanel. First login to your cPanel control panel and click Backups. Under Download a MySQL Database Backup, click the name

How to create MYSQL database using PhpMyAdmin in localhost

I was planning to develop a tourism website on WordPress. As a first step, I installed LAMP on my PC in which I am using Ubuntu 16.04. Then I installed PhpMyAdmin on my computer by following this tutorial. Then started

Disable MySQL Strict Mode

To disable MySQL strict mode, edit my.cnf file Find something like following. Replace with Now restart MySQL Verify MySQL Strict Mode To verify if you are running MySQL on strict mode or not, run If MySQL is not running under

mysql optimization

Using MySQLTunner MySQLTuner is a perl script that check your MySQL installation and suggest you changes based on your usage. To optimize MySQL, run Follow the suggestions it shows. See MySQL

Ubuntu 16 mysqldump Got packet bigger than max_allowed_packet

When taking MySQL backup with mysqldump, i get following error On Ubuntu 16.04, this error is fixed by editing Find Add brlow Here is the modified file Edit 50-server.cnf Find Update value to higher, something like Now restart MySQL Verify

How To Move MySQL Data Directory (datadir)

Create a directory in the drive you want to store MySQL datadir. In this example, we create mysql folder in /backup partition. Now we have MySQL data copied, but we don’t have all data as MySQL service is running and

configure: error: libmysqlclient is needed for MySQL support

When i install pureftpd with mysql support on CentOS 7 server, i get following error This is because MySql dev packages are missing on the server. Fixed by installing

Repair MySQL MyISAM Database with myisamchk

myisamchk is a command line tool to repair MySQL MyISAM database. You need to run it a user root. To repair all MyISAM tables in a database, run Example [root@localhost ~]# myisamchk –recover /var/lib/mysql/w3blogs/wp_blogs – recovering (with sort) MyISAM-table ‘/var/lib/mysql/w3blogs/wp_blogs’

MySQL Slow Query Log

MySQL Slow Query Log i used to find SQL query that are slow. To enable Slow Query Log, add following to /etc/my.cnf file under [mysqld] section. If you don’ have folder /var/log/mysql/, create it Now restart MySQL or

InnoDB: mmap(x bytes) failed; errno 12

On a VPS, MariaDB refused to start with error [root@ip-10-0-51-171 mariadb]# service mariadb start Redirecting to /bin/systemctl start mariadb.service Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.