you're reading...

How to create user in MySQL

This is the quick and straight way how to create a user in MySQL with permissions on specified database. Although it is very good described in MySQL documentation, I was tired of searching the help everytime when I need this androx studio 다운로드. So that’s why this quick post emerged, hope that you will enjoy it.First run the command line for MySQL. Linux user will simply run mysql binary from shell, windows user have to change actual directory to “bin” in your MySQL installation folder first and run the command from there (or include the full path to binary mysql.exe) 주홍글씨 다운로드.

mysql -u root

Or if your root account is configured with password

mysql -u root -p

Now you are logged in MySQL console 다운로드. Run following command for list all existing databases

show databases;

Then we will create database and then we will create our user and set him as a administrator of the database (we will give him all permissions on it) 오라클 인스턴트 클라이언트 다운로드. The user can access the databases only from local machine – if you need remote access, you have to change the command and include IP of the remote machine in ‘username’@’localhost’ to ‘username’@’IP’ 철권 게임 다운로드.

mysql> create database our_new_database;
Query OK, 1 row affected (0.01 sec)
mysql> grant all on our_new_database.* to 'username'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.02 sec)

Okay, and it is done – now you can try to access your account with your new user 터보클리너 다운로드.

C:Program FilesMySQLMySQL Server 5.0bin>mysql -u username -p
Enter password: *******
Welcome to the MySQL monitor.  Commands end with ; or g 스위치 데모 다운로드.
Your MySQL connection id is 13
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer 멜론차트 2019년 1월.



No comments yet.

Leave a comment

Your email address will not be published. Required fields are marked *