How to create a database from shell command?

前端 未结 8 1735
难免孤独
难免孤独 2021-01-29 17:24

I\'m looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints?

8条回答
  •  终归单人心
    2021-01-29 18:06

    Connect to DB using base user: mysql -u base_user -pbase_user_pass And execute CREATE DATABASE, CREATE USER and GRANT PRIVILEGES Statements.

    Here's handy web wizard to help you with statements www.bugaco.com/helpers/create_database.html

提交回复
热议问题