

A highly recommended software is Stellar Data Recovery Free Edition for Mac that can efficiently do the job for you. You can opt for data recovery if the file you are looking for is lost/deleted. Your Mac has built-in features like Finder, Spotlight, and Terminal to help you locate the files on your system. This blog talks about the familiar places to look from and methods you can use to find your file. Information_schema and mysql are name of databases.Searching for a file in your Mac is easy when you know where and how to look.

To list database type the following command mysql> show databases You may need to provide mysql username, password and hostname, use: $ mysql -user=your-user-name -password=your-password Invoke it from the prompt of your command interpreter as follows: $ mysql mysql is command line and it is very easy to use. To list all the databases execute this command in terminal: mysql -u root -p -e 'show databases' It will silently create a database mydb without giving any message/output. To create database mydb execute following command in terminal: mysql -u root -p -e 'create database mydb' If you want to select all the information from person and want to save in a file: mysql -u root -p -e 'Select * from person' mydb > personinfoĪnd of-course you can create a database using terminal itself If you want to insert values in person: mysql -u root -p -e 'Insert into person(PersonID,LastName,FirstName) Values(100,"Kumar","Saurav")' mydb Similary you can execute any query you want. Where root is the username, mydb is the name of the database. If you want to create a table person then: mysql -u root -p -e 'Create table person(PersonID int, LastName varchar(255), FirstName varchar(255))' mydb Syntax: mysql -u user_name -p password -e 'SQL Query' databaseĬlearificance: -u : Specify mysql database user name Here is the syntax to execute sql statement from terminal
