How to dump Database without Password from Linux Command line?

In this article, I am going to explain How to dump Database without a Password from the Linux Command line?

As we know when someone wants to dump a database from the Linux command line they need a password for the database to dump it. Basically dumping database means exporting the database from the Linux command line.

In a normal way when you want to export a database you need a password for the database to do it. Here is the normal command to dump.

mysqldump -u [user name] -p[password] [database name] > [dump file]

But sometimes people don’t like to give passwords again and again. So here I will tell you how you can do the database dump using a password. To do so just follow the process along with me.

You have to do some configurations on the MySQL configurations to dump the database without a password. You have to set the root user database password in my.cnf file and you can dump a database without a password. To do so first login to your root ssh using an ssh client like bitvise, putty, etc.

Location of my.cnf is different in the case of different operating systems like in the case of Ubuntu it is /etc/mysql/my.cnf and in case of Centos it /etc/my.cnf.

You can open according to your operating system after logging in to root ssh.

How to dump Database without Password from Linux Command line?

No got to my.cnf simply run this command:

sudo nano /etc/mysql/my.cnf

After that paste, this code in the file

[mysqldump]
user=mysqluser
password=secret

user will be root and the password of your root MySQL user.

After doing this just restart MySQL or MariaDB and run any dump command

mysqldump -u root [Database naem] > /dbbackup.sql

Here you can read How to log in to the Rainloop admin dashboard?

Read More: How to Change Upload limit On CyberPanel?

How to Change Upload limit On CyberPanel?

How to export Database from PHPMyAdmin?

While transferring your website from one server to another you may need to export your database in some cases. In this article, I am going to show you how to export Database from PHPMyAdmin.

Exporting a database is just a few-click process. Just login to your PHPMyAdmin dashboard providing username and password. to export Database from PHPMyAdmin

export Database from PHPMyAdmin

You can see all the database you have created In your database is there.

Select the database you want to export. To select a database click on it. And you can see all the tables of your database on your screen.

Read more: How to create, delete and manage Child Domains in CyberPanel?

database

Now from the top bar click on the Export button to start the export database.

go button

Now you have to select the type of file in which you want to export your database. After selecting file type click on the Go button on the right bottom side.

file type

on clicking the Go button process will start and you can see the download progress on your browser.

download

Once done you can use it for importing anywhere.

Also read: How to resolve PHPMyAdmin blank page error CyberPanel?

Read: How to connect CyberPanel with CyberPanel Cloud?

Follow US on Facebook / Twitter Instagram .

How to access MySql root user using the command line?

Often in the case of big databases or lack of user interfaces you need to do MySQL functions using the command line on your server. In this article, we will discuss How to access MySql root users using the command line?

We try to minimize this article as we can.

  1. Login to SSH using your credetial vis putty/bitvise etc.
  2. Now copy this comand and paste on your ssh terminal.
mysql -u root -p

After this terminal will ask for the root MySQL password provide a password to be processed.

In the case of cyberpanel Mysql root password location is. /etc/cyberpanel/mysqlPassword. use cmd to show.

cat /etc/cyberpanel/mysqlPassword

Read: How to connect CyberPanel with CyberPanel Cloud?

Read more: How to create, delete and manage Child Domains in CyberPanel?

Follow US on Facebook / Twitter Instagram .