Step 1: Login to your server via SSH as root user. Step 2 Use below command to create / export a database. mysqldump database_name > /backup/database_name.sql Where database_name -> The name of database of which you want to create backup. /backup/database_name.sql -> Location and file name of database backup file.
Login to your server as root via SSH. Step 2 By default, MySQL root password is saved in the /root/.my.cnf file. Open this file using command. cat /root/.my.cnf Step 3 Here you can see your server mysql root password. [vps_hosting]
In this tutorial I will explain how to install and setup LAMP on a RHEL/CentOS Linux 6.x server. Before I start the tutorial, let’s know what is LAMP. LAMP stack is a group of open source software used to get web servers up and running. LAMP stands for Linux, Apache, MySQL, and PHP.
Following command will install MySQL on a CentOS server / VPS. Login to your server as root via SSH, and run following command. Step 1: yum install mysql-server service mysqld start Step 2: Set MySQL server root password. sudo /usr/bin/mysql_secure_installation MySQL server will ask MySQL server root password. Since you just installed mysql, there is […]
Using below commands you can start, stop and restart MySQL from SSH. Login to your server as root via SSH, and run following commands. Start MySQL service mysql start OR /etc/init.d/mysql start Stop MySQL service mysql stop OR /etc/init.d/mysql stop Restart MySQL service mysql restart OR /etc/init.d/mysql restart Status of MySQL If you want to […]
If you want to see the list of MySQL errors on your server, please follow below steps. You can use tail or cat command to read the error log file. Tail command will display last 10 lines while cat command will display entire log file. Login to your server as root via SSH and run […]
MySQLTuner is great script to optimize mysql database of a server. It reports a large number of statistics and settings from your MySQL database engine, and then offers general recommendations to improve performance. To run MySQLTuner on a serve / VPS with cPanel, run following command in SSH /usr/local/cpanel/bin/mysqltuner.pl [vps_hosting]
This tutorial explains how you can change or move MySQL /tmp directory to a new location on a server / VPS. Login as root to your server via SSH. Step 1: Open /etc/my.cnf file for editing nano /etc/my.cnf Step 2: Add below line under the [mysqld] section and save the file. tmpdir=/home/mysqltmp To save file […]
By default all MySQL database on a server is saved in /var/lib/mysql directory. If you don’t have enough space left in /var directory or if its filling up quickly, you can move your MySQL directory to /home partition. Assuming you have enough space in /home partition, follow below steps to move MySQL to a new […]
Server root MySQL password can be different from server root password. Here is how you can get root MySQL password. Login as root via SSH and execute following command tail /root/.my.cnf OR cat /root/.my.cnf This will show you the root MySQL password of your server. [dedicated_hosting]