• 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

Instructions for updating PHP to avoid PHP2Shell
Network

Instructions for updating PHP to avoid PHP2Shell

October 22, 2026
Instructions for detecting network vulnerabilities: How to check the system for data leaks (IP/DNS)
Network

Instructions for detecting network vulnerabilities: How to check the system for data leaks (IP/DNS)

October 9, 2026
Is Renting a Cheap VPS to Run Docker Really Effective?
Network

Is Renting a Cheap VPS to Run Docker Really Effective?

July 2, 2026
How to get a free domain for 1 year from Gravatar
Network

How to get a free domain for 1 year from Gravatar

June 23, 2026
Cloud Infrastructure Resilience: Mitigating Advanced Layer 7 Vulnerabilities and Securing High-Throughput Database Handshakes
Network

Cloud Infrastructure Resilience: Mitigating Advanced Layer 7 Vulnerabilities and Securing High-Throughput Database Handshakes

June 20, 2026
Save image as Type contains malicious code: Remove immediately before losing money unfairly!
Network

Save image as Type contains malicious code: Remove immediately before losing money unfairly!

March 19, 2026
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

Recent News

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
Postpaid for new employees: Should you start using it?

Postpaid for new employees: Should you start using it?

October 26, 2026
How to create a UFO Game that calls students to return their homework

How to create a UFO Game that calls students to return their homework

October 26, 2026
Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
Postpaid for new employees: Should you start using it?

Postpaid for new employees: Should you start using it?

October 26, 2026
How to create a UFO Game that calls students to return their homework

How to create a UFO Game that calls students to return their homework

October 26, 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

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
Postpaid for new employees: Should you start using it?

Postpaid for new employees: Should you start using it?

October 26, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

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

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

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