• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

Create Database and User MySQL with Command (Command)

AnonyViet by AnonyViet
January 27, 2023
in Network
0

The following article will guide you to create users and databases using MySQL via the command line (Terminal).

Join the channel Telegram of the AnonyViet 👉 Link 👈

MySQL Login

mysql -u root -p

Create a new database

create database tên_database_muốn_tạo ;

Create and assign permissions for users

create user 'tên_username'@'localhost' identified by 'password_muốn_tạo';

To change the user’s password, use the command:

set password for 'tên_username'@'localhost' = password('password_muốn_đổi');

Set all permissions for the user using the command:

grant all on tên_database.* to tên_username@localhost;

If you want to assign limited permissions to users, use the following command line:

grant SELECT on tên_database.* to tên_username@localhost;

Change the word SELECT with one of the following rights

List of permissions you can set for the user:

ALL
ALTER
CREATE VIEW
CREATE
DELETE
DROP
GRANT OPTION
INDEX
INSERT
SELECT
SHOW VIEW
TRIGGER
UPDATE

Reload all the privileges

FLUSH PRIVILEGES;

Exit MySQL command mode

exit

Here is the entire command to create a database, a user and assign user permissions to the database:

You can change the database name, user, password as you like

mysql -u root -p
create database dq_website;
create user duyquang@localhost;
SET PASSWORD FOR duyquang@localhost= PASSWORD("123456");
GRANT ALL PRIVILEGES ON dq_website. * TO duyquang@localhost IDENTIFIED BY "123456";
FLUSH PRIVILEGES;
exit;

The article achieved: 5/5 – (100 votes)

Tags: CommandcreateDatabaseMySQLUser
Previous Post

How to Create a Free SEMrush Account to check Website SEO

Next Post

Share Tool DDoS Bypass Cloudflare Japan V3.0

AnonyViet

AnonyViet

Related Posts

Pia S5 Proxy 2026 review: The best residential Socks5 Proxy today
Network

Pia S5 Proxy 2026 review: The best residential Socks5 Proxy today

January 20, 2026
Common mistakes when choosing cheap hosting for the first time
Network

Common mistakes when choosing cheap hosting for the first time

January 19, 2026
How to fix the error of Wireguard Client not being able to access the Internet when NAT twice
Network

How to fix the error of Wireguard Client not being able to access the Internet when NAT twice

November 20, 2025
How to configure dynamic IP as static IP with Cloudflare to do Lab at home
Network

How to configure dynamic IP as static IP with Cloudflare to do Lab at home

November 19, 2025
What is Direct Connect AWS? Benefits when businesses use Direct Connect AWS
Network

What is Direct Connect AWS? Benefits when businesses use Direct Connect AWS

October 29, 2025
Namecheap offers 3 Domains for alt=
Network

Namecheap offers 3 Domains for $0

October 7, 2025
Next Post
Share Tool DDoS Bypass Cloudflare Japan V3.0

Share Tool DDoS Bypass Cloudflare Japan V3.0

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Papercraft paper model download site for free without logging in

Papercraft paper model download site for free without logging in

January 21, 2026
How to post a Zalo story that will be visible for 24 hours is extremely simple

How to post a Zalo story that will be visible for 24 hours is extremely simple

January 21, 2026
Pia S5 Proxy 2026 review: The best residential Socks5 Proxy today

Pia S5 Proxy 2026 review: The best residential Socks5 Proxy today

January 20, 2026
How to use Microsoft 365 for free, no installation required

How to use Microsoft 365 for free, no installation required

January 20, 2026
Papercraft paper model download site for free without logging in

Papercraft paper model download site for free without logging in

January 21, 2026
How to post a Zalo story that will be visible for 24 hours is extremely simple

How to post a Zalo story that will be visible for 24 hours is extremely simple

January 21, 2026
Pia S5 Proxy 2026 review: The best residential Socks5 Proxy today

Pia S5 Proxy 2026 review: The best residential Socks5 Proxy today

January 20, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Papercraft paper model download site for free without logging in

Papercraft paper model download site for free without logging in

January 21, 2026
How to post a Zalo story that will be visible for 24 hours is extremely simple

How to post a Zalo story that will be visible for 24 hours is extremely simple

January 21, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

https://sun52.network

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

https://sun52.network

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply