• 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

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
Instructions on how to register a .co.uk domain name for free for 1 year
Network

Instructions on how to register a .co.uk domain name for free for 1 year

March 12, 2026
How to Setup Paperclip AI: Create a Company for AI Agent
Network

How to Setup Paperclip AI: Create a Company for AI Agent

March 12, 2026
Compilation of free and cheap APIs to run OpenClaw stably
Network

Compilation of free and cheap APIs to run OpenClaw stably

March 10, 2026
3 Services to Determine IP Location for Website (IP Geolocation API)
Network

3 Services to Determine IP Location for Website (IP Geolocation API)

March 10, 2026
How to buy a .STORE domain name for 1 USD (2026): Detailed instructions from A–Z
Network

How to buy a .STORE domain name for 1 USD (2026): Detailed instructions from A–Z

March 3, 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
Inline Feedbacks
View all comments

Recent News

Practical use of Xiaomi 17T Pro: This is a good phone in 2026

Practical use of Xiaomi 17T Pro: This is a good phone in 2026

June 8, 2026
Instructions to receive 6 months of IObit Malware Fighter 13 Pro for free

Instructions to receive 6 months of IObit Malware Fighter 13 Pro for free

June 7, 2026
How to use free online textbooks from grades 1 to 12

How to use free online textbooks from grades 1 to 12

June 6, 2026
How to convert HEIC photos to JPG on iPhone without using an app

How to convert HEIC photos to JPG on iPhone without using an app

June 5, 2026
Practical use of Xiaomi 17T Pro: This is a good phone in 2026

Practical use of Xiaomi 17T Pro: This is a good phone in 2026

June 8, 2026
Instructions to receive 6 months of IObit Malware Fighter 13 Pro for free

Instructions to receive 6 months of IObit Malware Fighter 13 Pro for free

June 7, 2026
How to use free online textbooks from grades 1 to 12

How to use free online textbooks from grades 1 to 12

June 6, 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

Practical use of Xiaomi 17T Pro: This is a good phone in 2026

Practical use of Xiaomi 17T Pro: This is a good phone in 2026

June 8, 2026
Instructions to receive 6 months of IObit Malware Fighter 13 Pro for free

Instructions to receive 6 months of IObit Malware Fighter 13 Pro for free

June 7, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

6789 kv999

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

6789 kv999

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