Skip to content

Commit 4f54109

Browse files
authored
Update Get-POS
1 parent 5dc7f52 commit 4f54109

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Get-POS

+3-3
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ echo "MySQL Database & User Created Successfully!"
378378
echo ""
379379
echo "Importing Default DB Values..."
380380
echo ""
381-
mysql -u $(whoami) -p$rootpwd --execute="CREATE USER '$(whoami)_$usernames'@'localhost' IDENTIFIED BY '$passwd';" 2> /tmp/error1
382-
mysql -u $(whoami) -p$rootpwd --execute="GRANT ALL PRIVILEGES ON $(whoami)_$dbname.* TO '$(whoami)_$usernames'@'localhost' IDENTIFIED BY '$passwd' WITH GRANT OPTION;" 2> /tmp/error1
383-
mysql -u $(whoami) -p$rootpwd --execute="FLUSH PRIVILEGES;" 2> /tmp/error1
381+
/usr/bin/uapi Mysql create_database name=$(whoami)_$dbname > /dev/null 2>&1
382+
/usr/bin/uapi Mysql create_user name=$(whoami)_$usernames password=$passwd > /dev/null 2>&1
383+
/usr/bin/uapi Mysql set_privileges_on_database user=$(whoami)_$usernames database=$(whoami)_$dbname privileges=ALL%20PRIVILEGES > /dev/null 2>&1
384384
mysql -hlocalhost -u $(whoami)_$usernames -p$passwd $(whoami)_$dbname < $HOME/OSPOS/database/database.sql &>/dev/null & spinner
385385
echo ""
386386
echo "47 SQL Tables Created"

0 commit comments

Comments
 (0)