MySQL

How to delete a Database in MySQL

Open terminal and go to mySQL server install dir and run the following command to export database dump /usr/local/mysql-8.0.30-macos12-x86_64/bin/mysql -u root -p “/usr/local/mysql-8.0.30-macos12-x86_64/bin/” Path/location where MySql server is installed“mysqldump” – command for database export“-u root” root user“-p” is it for password but will ask later Show list of Database in MYSQL SHOW DATABASES; command to delete …

How to delete a Database in MySQL Read More »

How to Import Database Dump in MySQL ?

Before Import any database dump into MYSQL server, need to make sure that database and user are created. We can create database and account using below command on Terminal. d@MacBook-Air % /usr/local/mysql-8.0.30-macos12-x86_64/bin/mysql -u root -pEnter Password -> Type root passwordmysql> create database db2005;mysql> create user ‘admin1’@’localhost’ identified by ‘db123’;mysql> grant all on db2005.* to ‘admin1’@’localhost’;mysql> …

How to Import Database Dump in MySQL ? Read More »