11/3/2015 - 10:33 AM

Sql tips create db from (

Log in as the root user (or any other MySQL user that has the CREATE, CREATE USER and GRANT OPTION privileges):
# mysql --host=<mysql_host> --port=<port> -u <mysql_user> -p<mysql_password>
Note that if MySQL is installed on the same server, the "--host" parameter can be omitted. If the "--port" parameter is omitted, the default port for MySQL traffic will be used (port 3306).
The MySQL client should display a "mysql>" prompt.

Create a new database:
mysql> CREATE DATABASE <database> CHARACTER SET utf8;
Grant access permissions:
mysql> GRANT ALL ON <database>.* TO <user>@<ezp_host> IDENTIFIED BY '<password>';