Skip to content
Advertisement

MariaDB : create database and execute sql script without ‘<' character from the command line cmd.exe

I’m trying in every way to create a database and populate it with sql script from the command line.

or the only database:

I’m going to manage it through powershell but before to do it I want to be sure it works from mariaDB command line. (Powershell doesn’t recognize ‘<‘ character).

Is it possible create db and populate it from command line ? Thank to all

Advertisement

Answer

The preferrable way to open and populate a database with PowerShell would be to first jump to the mysql command prompt:

Then enter your password. In the mysql CLI, open the database with the following commands:

If you have to create the database first, do the following:

Or if you prefer oneliners:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement