Logo
My Journal
Blog

Timeline

Blog

Adding new users to MySQL Databases

#
# Connect to the local database server as user root
# You will be prompted for a password.
#
mysql -h localhost -u root -p

#
# Now we see the ‘mysql>’ prompt and we can run
# the following to create a new database for xmodx.
#
mysql> create database xmodxdb;

#
# Now we create the user xmodx and give him full
# permissions on the new database
mysql> grant CREATE,INSERT,DELETE,UPDATE,SELECT on xmodxdb.* to xmodx@localhost;

#
# Next we set a password for this new user
#
mysql> set password for xmodx@localhost = password(‘s0m3h@rdt0g3tp@55phr@53’);

#
# Cleanup and ext
mysql> flush privileges;
mysql> exit;

Leave A Comment