Author: ddenia
Date: 26-10-11 13:22
Create a new user and database in Mysql
A short note on the establishment of the command-line mysql new database and new user with full rights to the newly created database.
Login to mysql
# mysql -u root -p
mysql> CREATE DATABASE <имя новой БД> CHARACTER SET utf8 COLLATE utf8_general_ci ;
mysql> GRANT ALL PRIVILEGES ON <имя БД>.* TO 'имя нового юзера'@'localhost' IDENTIFIED BY 'пароль' WITH GRANT OPTION;
mysql> quit;
To look at the settings of an existing database, you must execute the command:
mysql> SHOW CREATE DATABASE <имя БД>;
To change the database using the command use <имя базы>;
http://it-admin.org/os-freebsd/sozdaem-novogo-polzovatelya-i-bazu-v-mysql.html
|
|