|  
도움말

GoDaddy 도움말

How to create a MySQL user

MySQL is currently one of the most popular relational database management systems (RDBMSs) in the world. MySQL is available for a variety of platforms, including Linux operating systems such as CentOS.

User names allow the system administrators in MySQL to control the access that each user has. Each end user should have an individual user name so that administrators can determine which user has performed a particular action. Adding users in MySQL is a routine administrator task that requires root access.

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
TIME REQUIRED 5 min
RELATED PRODUCTS Linux-based VPS or dedicated servers

Here is a quick tutorial on how to add a new user in MySQL.

Log on to MySQL with root

Use the following command from the CentOS command line to log on to MySQL with the root user name:

# mysql -u root -p

Enter the password for root when prompted.

Create the MySQL user name and quit MySQL

Create the user ‘testuser' for the host ‘localhost' with the password ‘testpassword':

mysql> create user 'testuser'@'localhost' identified by 'testpassword';
mysql> quit

Log on to MySQL with the user name

Verify that you have successfully created the user name by logging back in to MySQL with the user name that you just created:

# mysql -u testuser -p

Enter the password 'testpassword' when prompted.

The above commands should produce output similar to the following:


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.