How To Create A MySQL Database Account Using version 4.1.22

Omega002
Omega002 used Ask the Experts™
on
What is the syntax to create a new database user for MySQL 4.1.22? I tried the following syntax listed below but it did not work:

1) CREATE USER dba01 IDENTIFIED BY 'password1';

2) CREATE USER 'dba01'@'localhost' IDENTIFIED BY 'password1';
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What about error messages?

Author

Commented:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USER 'dba01'@'localhost' IDENTIFIED BY 'p@ssw0rd01'' at line 1
Sorry, I missed that part about your mysql version.
In 4.x you cannot use create user statement.
You can create users with 'grant' statement, or by directly inserting proper data into mysql.user table.
http://dev.mysql.com/doc/refman/4.1/en/adding-users.html

Author

Commented:
NA

Author

Commented:
NA

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial